From 91fae82528c67bc2b48d1cb154d8c7f4f8ba2bf6 Mon Sep 17 00:00:00 2001 From: Shinjiman Date: Tue, 28 Apr 2009 06:01:48 +0000 Subject: [PATCH] Follow up r49996, changing pathrev to revision on non-trunk preventing the 404 error. --- includes/specials/SpecialVersion.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index 982f89c198..cd68cc03d8 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -405,7 +405,11 @@ class SpecialVersion extends SpecialPage { return false; } else { $viewvcStart = 'http://svn.wikimedia.org/viewvc/mediawiki/'; - $viewvcEnd = '/?pathrev='; + if (strstr( $content[4], 'trunk' )) + $viewvcEnd = '/?pathrev='; + else + // Avoids 404 error using pathrev when it does not found + $viewvcEnd = '/?revision='; $viewvc = $viewvcStart . $endPath . $viewvcEnd; return $viewvc; } -- 2.20.1