Follow up r49996, changing pathrev to revision on non-trunk preventing the 404 error.
authorShinjiman <shinjiman@users.mediawiki.org>
Tue, 28 Apr 2009 06:01:48 +0000 (06:01 +0000)
committerShinjiman <shinjiman@users.mediawiki.org>
Tue, 28 Apr 2009 06:01:48 +0000 (06:01 +0000)
includes/specials/SpecialVersion.php

index 982f89c..cd68cc0 100644 (file)
@@ -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;
                                        }