r18896 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r18895‎ | r18896 | r18897 >
Date:00:20, 7 January 2007
Author:hashar
Status:old
Tags:
Comment:
- whitespaces
+ comments
Modified paths:
  • /trunk/phase3/includes/SpecialVersion.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialVersion.php
@@ -42,6 +42,8 @@
4343 */
4444
4545 /**
 46+ * Return wiki text showing the licence information and third party
 47+ * software versions (apache, php, mysql).
4648 * @static
4749 */
4850 function MediaWikiCredits() {
@@ -80,12 +82,14 @@
8183 return str_replace( "\t\t", '', $ret );
8284 }
8385
 86+ /** Return a string of the MediaWiki version with SVN revision if available */
8487 public static function getVersion() {
8588 global $wgVersion, $IP;
8689 $svn = self::getSvnRevision( $IP );
8790 return $svn ? "$wgVersion (r$svn)" : $wgVersion;
8891 }
8992
 93+ /** Generate wikitext showing extensions name, URL, author and description */
9094 function extensionCredits() {
9195 global $wgExtensionCredits, $wgExtensionFunctions, $wgParser, $wgSkinExtensionFunction;
9296
@@ -132,7 +136,7 @@
133137 $out .= "** Parser extension tags:\n";
134138 $out .= '***' . $this->listToText( $tags ). "\n";
135139 }
136 -
 140+
137141 if( $cnt = count( $fhooks = $wgParser->getFunctionHooks() ) ) {
138142 $out .= "** Parser function hooks:\n";
139143 $out .= '***' . $this->listToText( $fhooks ) . "\n";
@@ -146,6 +150,7 @@
147151 return $out;
148152 }
149153
 154+ /** Callback to sort extensions by type */
150155 function compare( $a, $b ) {
151156 if ( $a['name'] === $b['name'] )
152157 return 0;
@@ -182,11 +187,11 @@
183188 if ( count( $wgHooks ) ) {
184189 $myWgHooks = $wgHooks;
185190 ksort( $myWgHooks );
186 -
 191+
187192 $ret = "* Hooks:\n";
188193 foreach ($myWgHooks as $hook => $hooks)
189194 $ret .= "** $hook: " . $this->listToText( $hooks ) . "\n";
190 -
 195+
191196 return $ret;
192197 } else
193198 return '';
@@ -217,7 +222,7 @@
218223 $t = array_slice( $list, 0, $cnt - 1 );
219224 $one = array_map( array( &$this, 'arrayToString' ), $t );
220225 $two = $this->arrayToString( $list[$cnt - 1] );
221 -
 226+
222227 return implode( ', ', $one ) . " and $two";
223228 }
224229 }
@@ -240,7 +245,7 @@
241246
242247 /**
243248 * Retrieve the revision number of a Subversion working directory.
244 - *
 249+ *
245250 * @bug 7335
246251 *
247252 * @param string $dir