From c0e63d14e68d4c4acfd88ebe36693bec06476598 Mon Sep 17 00:00:00 2001 From: Nate Eagleson Date: Mon, 18 Feb 2013 23:06:40 -0500 Subject: [PATCH] Fix raw blob view A previous change of mine had broken it. Also rename a route parameter in CommitController for consistency with other route params. --- src/GitList/Controller/CommitController.php | 6 +++--- views/file.twig | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/GitList/Controller/CommitController.php b/src/GitList/Controller/CommitController.php index e778d08..306b327 100644 --- a/src/GitList/Controller/CommitController.php +++ b/src/GitList/Controller/CommitController.php @@ -91,11 +91,11 @@ class CommitController implements ControllerProviderInterface ->assert('commit', '[a-f0-9^]+') ->bind('commit'); - $route->get('{repo}/blame/{branch_file}', function($repo, $branch_file) use ($app) { + $route->get('{repo}/blame/{commitish_path}', function($repo, $commitish_path) use ($app) { $repository = $app['git']->getRepository($app['git.repos'] . $repo); list($branch, $file) = $app['util.routing'] - ->parseCommitishPathParam($branch_file, $repo); + ->parseCommitishPathParam($commitish_path, $repo); list($branch, $file) = $app['util.repository']->extractRef($repository, $branch, $file); @@ -110,7 +110,7 @@ class CommitController implements ControllerProviderInterface 'blames' => $blames, )); })->assert('repo', $app['util.routing']->getRepositoryRegex()) - ->assert('branch_file', $app['util.routing']->getCommitishPathRegex()) + ->assert('commitish_path', $app['util.routing']->getCommitishPathRegex()) ->bind('blame'); return $route; diff --git a/views/file.twig b/views/file.twig index 6b18290..e1cc54e 100644 --- a/views/file.twig +++ b/views/file.twig @@ -13,12 +13,12 @@
Raw - Blame + Blame History
{% if fileType == 'image' %} -
{{ file }}
+
{{ file }}
{% elseif fileType == 'markdown' %}
{{ blob }}