From 8963b0d6c2be95caa11fcd5eee28ecd2cf687a2a Mon Sep 17 00:00:00 2001 From: Klaus Silveira Date: Sat, 14 Jul 2012 15:44:10 -0300 Subject: [PATCH] Trying to make this a little better for readability --- controllers/archiveController.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/controllers/archiveController.php b/controllers/archiveController.php index f0e89f9..06092b5 100644 --- a/controllers/archiveController.php +++ b/controllers/archiveController.php @@ -7,10 +7,15 @@ $app->get('{repo}/{format}ball/{branch}', function($repo, $format, $branch) use( $tree = $repository->getBranchTree($branch); if (false === $tree) { - return $app->abort(404, 'Invalid commit or tree reference: '.$branch); + return $app->abort(404, 'Invalid commit or tree reference: '. $branch); } - $file = $app['cache.archives'].DIRECTORY_SEPARATOR.$repo.DIRECTORY_SEPARATOR.substr($tree, 0, 2).DIRECTORY_SEPARATOR.substr($tree, 2).'.'.$format; + $file = $app['cache.archives'] . DIRECTORY_SEPARATOR + . $repo . DIRECTORY_SEPARATOR + . substr($tree, 0, 2) . DIRECTORY_SEPARATOR + . substr($tree, 2) + . '.' + . $format; if (!file_exists($file)) { $repository->createArchive($tree, $file, $format);