Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -163,6 +163,7 @@ |
164 | 164 | * (bug 7109) Fix Atom feed version number in header links |
165 | 165 | * (bug 7075) List registered parser function hooks on Special:Version |
166 | 166 | * (bug 7059) Introduce "anchorencode" colon function |
| 167 | +* Include SVN revision number in {{CURRENTVERSION}} output, where applicable |
167 | 168 | |
168 | 169 | == Languages updated == |
169 | 170 | |
Index: trunk/phase3/includes/Parser.php |
— | — | @@ -2474,8 +2474,9 @@ |
2475 | 2475 | case 'localtimestamp': |
2476 | 2476 | return $varCache[$index] = $localTimestamp; |
2477 | 2477 | case 'currentversion': |
2478 | | - global $wgVersion; |
2479 | | - return $wgVersion; |
| 2478 | + return $varCache[$index] = SpecialVersion::getVersion(); |
| 2479 | + #global $wgVersion; |
| 2480 | + #return $wgVersion; |
2480 | 2481 | case 'sitename': |
2481 | 2482 | return $wgSitename; |
2482 | 2483 | case 'server': |
Index: trunk/phase3/includes/SpecialVersion.php |
— | — | @@ -45,7 +45,7 @@ |
46 | 46 | * @static |
47 | 47 | */ |
48 | 48 | function MediaWikiCredits() { |
49 | | - $version = $this->getVersion(); |
| 49 | + $version = self::getVersion(); |
50 | 50 | $dbr =& wfGetDB( DB_SLAVE ); |
51 | 51 | |
52 | 52 | $ret = |
— | — | @@ -77,9 +77,9 @@ |
78 | 78 | return str_replace( "\t\t", '', $ret ); |
79 | 79 | } |
80 | 80 | |
81 | | - function getVersion() { |
| 81 | + public static function getVersion() { |
82 | 82 | global $wgVersion, $IP; |
83 | | - $svn = $this->getSvnRevision( $IP ); |
| 83 | + $svn = self::getSvnRevision( $IP ); |
84 | 84 | return $svn ? "$wgVersion (r$svn)" : $wgVersion; |
85 | 85 | } |
86 | 86 | |
— | — | @@ -241,7 +241,7 @@ |
242 | 242 | * @param string $dir |
243 | 243 | * @return mixed revision number as int, or false if not a SVN checkout |
244 | 244 | */ |
245 | | - function getSvnRevision( $dir ) { |
| 245 | + public static function getSvnRevision( $dir ) { |
246 | 246 | if( !function_exists( 'simplexml_load_file' ) ) { |
247 | 247 | // We could fall back to expat... YUCK |
248 | 248 | return false; |