Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -2203,7 +2203,8 @@ |
2204 | 2204 | * <code> |
2205 | 2205 | * $wgExtensionCredits[$type][] = array( |
2206 | 2206 | * 'name' => 'Example extension', |
2207 | | - * 'version' => 1.9, |
| 2207 | + * 'version' => 1.9, |
| 2208 | + * 'svn-revision' => '$LastChangedRevision$', |
2208 | 2209 | * 'author' => 'Foo Barstein', |
2209 | 2210 | * 'url' => 'http://wwww.example.com/Example%20Extension/', |
2210 | 2211 | * 'description' => 'An example extension', |
Index: trunk/phase3/includes/SpecialVersion.php |
— | — | @@ -135,9 +135,20 @@ |
136 | 136 | usort( $wgExtensionCredits[$type], array( $this, 'compare' ) ); |
137 | 137 | |
138 | 138 | foreach ( $wgExtensionCredits[$type] as $extension ) { |
| 139 | + if ( isset( $extension['version'] ) ) { |
| 140 | + $version = $extension['version']; |
| 141 | + } elseif ( isset( $extension['svn-revision'] ) && |
| 142 | + preg_match( '/\$(?:Rev|LastChangedRevision|Revision): *(\d+)/', |
| 143 | + $extension['svn-revision'], $m ) ) |
| 144 | + { |
| 145 | + $version = 'r' . $m[1]; |
| 146 | + } else { |
| 147 | + $version = null; |
| 148 | + } |
| 149 | + |
139 | 150 | $out .= $this->formatCredits( |
140 | 151 | isset ( $extension['name'] ) ? $extension['name'] : '', |
141 | | - isset ( $extension['version'] ) ? $extension['version'] : null, |
| 152 | + $version, |
142 | 153 | isset ( $extension['author'] ) ? $extension['author'] : '', |
143 | 154 | isset ( $extension['url'] ) ? $extension['url'] : null, |
144 | 155 | isset ( $extension['description'] ) ? $extension['description'] : '', |