Index: trunk/phase3/includes/SpecialVersion.php |
— | — | @@ -42,6 +42,8 @@ |
43 | 43 | */ |
44 | 44 | |
45 | 45 | /** |
| 46 | + * Return wiki text showing the licence information and third party |
| 47 | + * software versions (apache, php, mysql). |
46 | 48 | * @static |
47 | 49 | */ |
48 | 50 | function MediaWikiCredits() { |
— | — | @@ -80,12 +82,14 @@ |
81 | 83 | return str_replace( "\t\t", '', $ret ); |
82 | 84 | } |
83 | 85 | |
| 86 | + /** Return a string of the MediaWiki version with SVN revision if available */ |
84 | 87 | public static function getVersion() { |
85 | 88 | global $wgVersion, $IP; |
86 | 89 | $svn = self::getSvnRevision( $IP ); |
87 | 90 | return $svn ? "$wgVersion (r$svn)" : $wgVersion; |
88 | 91 | } |
89 | 92 | |
| 93 | + /** Generate wikitext showing extensions name, URL, author and description */ |
90 | 94 | function extensionCredits() { |
91 | 95 | global $wgExtensionCredits, $wgExtensionFunctions, $wgParser, $wgSkinExtensionFunction; |
92 | 96 | |
— | — | @@ -132,7 +136,7 @@ |
133 | 137 | $out .= "** Parser extension tags:\n"; |
134 | 138 | $out .= '***' . $this->listToText( $tags ). "\n"; |
135 | 139 | } |
136 | | - |
| 140 | + |
137 | 141 | if( $cnt = count( $fhooks = $wgParser->getFunctionHooks() ) ) { |
138 | 142 | $out .= "** Parser function hooks:\n"; |
139 | 143 | $out .= '***' . $this->listToText( $fhooks ) . "\n"; |
— | — | @@ -146,6 +150,7 @@ |
147 | 151 | return $out; |
148 | 152 | } |
149 | 153 | |
| 154 | + /** Callback to sort extensions by type */ |
150 | 155 | function compare( $a, $b ) { |
151 | 156 | if ( $a['name'] === $b['name'] ) |
152 | 157 | return 0; |
— | — | @@ -182,11 +187,11 @@ |
183 | 188 | if ( count( $wgHooks ) ) { |
184 | 189 | $myWgHooks = $wgHooks; |
185 | 190 | ksort( $myWgHooks ); |
186 | | - |
| 191 | + |
187 | 192 | $ret = "* Hooks:\n"; |
188 | 193 | foreach ($myWgHooks as $hook => $hooks) |
189 | 194 | $ret .= "** $hook: " . $this->listToText( $hooks ) . "\n"; |
190 | | - |
| 195 | + |
191 | 196 | return $ret; |
192 | 197 | } else |
193 | 198 | return ''; |
— | — | @@ -217,7 +222,7 @@ |
218 | 223 | $t = array_slice( $list, 0, $cnt - 1 ); |
219 | 224 | $one = array_map( array( &$this, 'arrayToString' ), $t ); |
220 | 225 | $two = $this->arrayToString( $list[$cnt - 1] ); |
221 | | - |
| 226 | + |
222 | 227 | return implode( ', ', $one ) . " and $two"; |
223 | 228 | } |
224 | 229 | } |
— | — | @@ -240,7 +245,7 @@ |
241 | 246 | |
242 | 247 | /** |
243 | 248 | * Retrieve the revision number of a Subversion working directory. |
244 | | - * |
| 249 | + * |
245 | 250 | * @bug 7335 |
246 | 251 | * |
247 | 252 | * @param string $dir |