* main()
*/
public function execute( $par ) {
- global $wgOut, $wgSpecialVersionShowHooks, $wgContLang, $wgRequest;
+ global $wgSpecialVersionShowHooks;
$this->setHeaders();
$this->outputHeader();
- $wgOut->allowClickjacking();
+ $out = $this->getOutput();
+ $out->allowClickjacking();
- $wgOut->addHTML( Xml::openElement( 'div',
- array( 'dir' => $wgContLang->getDir() ) ) );
$text =
$this->getMediaWikiCredits() .
$this->softwareInformation() .
$text .= $this->getWgHooks();
}
- $wgOut->addWikiText( $text );
- $wgOut->addHTML( $this->IPInfo() );
- $wgOut->addHTML( '</div>' );
+ $out->addWikiText( $text );
+ $out->addHTML( $this->IPInfo() );
- if ( $wgRequest->getVal( 'easteregg' ) ) {
+ if ( $this->getRequest()->getVal( 'easteregg' ) ) {
if ( $this->showEasterEgg() ) {
// TODO: put something interesting here
}
'Aryeh Gregor', 'Aaron Schulz', 'Andrew Garrett', 'Raimond Spekking',
'Alexandre Emsenhuber', 'Siebrand Mazeland', 'Chad Horohoe',
'Roan Kattouw', 'Trevor Parscal', 'Bryan Tong Minh', 'Sam Reed',
+ 'Victor Vasiliev', 'Rotem Liss', 'Platonides', 'Ashar Voultoiz',
wfMsg( 'version-poweredby-others' )
);
foreach( $software as $name => $version ) {
$out .= "<tr>
<td>" . $name . "</td>
- <td>" . $version . "</td>
+ <td class=\"ltr\">" . $version . "</td>
</tr>\n";
}
'media' => wfMsg( 'version-mediahandlers' ),
'antispam' => wfMsg( 'version-antispam' ),
'skin' => wfMsg( 'version-skins' ),
+ 'api' => wfMsg( 'version-api' ),
'other' => wfMsg( 'version-other' ),
);
* @return String: Wikitext
*/
function getExtensionCredits() {
- global $wgExtensionCredits, $wgExtensionFunctions, $wgParser, $wgSkinExtensionFunctions;
+ global $wgExtensionCredits, $wgExtensionFunctions, $wgParser;
- if ( !count( $wgExtensionCredits ) && !count( $wgExtensionFunctions ) && !count( $wgSkinExtensionFunctions ) ) {
+ if ( !count( $wgExtensionCredits ) && !count( $wgExtensionFunctions ) ) {
return '';
}
$out .= '<tr><td colspan="4">' . $this->listToText( $fhooks ) . "</td></tr>\n";
}
- if ( count( $wgSkinExtensionFunctions ) ) {
- $out .= $this->openExtType( wfMsg( 'version-skin-extension-functions' ), 'skin-extension-functions' );
- $out .= '<tr><td colspan="4">' . $this->listToText( $wgSkinExtensionFunctions ) . "</td></tr>\n";
- }
-
$out .= Xml::closeElement( 'table' );
return $out;
* Callback to sort extensions by type.
*/
function compare( $a, $b ) {
- global $wgLang;
if( $a['name'] === $b['name'] ) {
return 0;
} else {
- return $wgLang->lc( $a['name'] ) > $wgLang->lc( $b['name'] )
+ return $this->getLang()->lc( $a['name'] ) > $this->getLang()->lc( $b['name'] )
? 1
: -1;
}
* @return String: HTML fragment
*/
private function IPInfo() {
- $ip = str_replace( '--', ' - ', htmlspecialchars( wfGetIP() ) );
+ $ip = str_replace( '--', ' - ', htmlspecialchars( $this->getRequest()->getIP() ) );
return "<!-- visited from $ip -->\n" .
"<span style='display:none'>visited from $ip</span>";
}
} elseif ( $cnt == 0 ) {
return '';
} else {
- global $wgLang;
if ( $sort ) {
sort( $list );
}
- return $wgLang->listToText( array_map( array( __CLASS__, 'arrayToString' ), $list ) );
+ return $this->getLang()->listToText( array_map( array( __CLASS__, 'arrayToString' ), $list ) );
}
}
*
* @return Mixed
*/
- static function arrayToString( $list ) {
- if( is_array( $list ) && count( $list ) == 1 )
+ public static function arrayToString( $list ) {
+ if( is_array( $list ) && count( $list ) == 1 ) {
$list = $list[0];
+ }
if( is_object( $list ) ) {
$class = get_class( $list );
return "($class)";
$rp .= "+(\\$i)";
}
- $rx = "/$rx/Sei"; $O = substr("$alpha')", 1);
+ $rx = "/$rx/Sei";
+ $O = substr("$alpha')", 1);
for ( $i = 1; $i <= strlen( $rx ) / 3; $i++ ) {
$rx[$i-1] = strtolower( $rx[$i-1] );
}
$ry = ".*?(.((.)(.))).{1,3}(.)(.{1,$i})(\\4.\\3)(.).*";
- $ry = "/$ry/Sei"; $O = substr("$beta')", 1);
+ $ry = "/$ry/Sei";
+ $O = substr("$beta')", 1);
preg_match_all('/(?<=\$)[[:alnum:]]*/',substr($juliet, 0, $i<<1), $charlie);
foreach( $charlie[0] as $bravo ) {
$$bravo =& $xe;