X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSpecialMaintenance.php;h=6f74bd5427839056cd4d57b73d2959d1cc52754a;hb=2a03980093b5168a834bbf65e820c5400e29b21b;hp=8b76d3e65b34d7b32c4169a6d9205cb7a8499859;hpb=fe299887d8c5fcbfcc9defeb3437564c2b47851c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/SpecialMaintenance.php b/includes/SpecialMaintenance.php index 8b76d3e65b..6f74bd5427 100644 --- a/includes/SpecialMaintenance.php +++ b/includes/SpecialMaintenance.php @@ -1,16 +1,25 @@ getNamespaces() ; + global $wgContLang ; + $ns = $wgContLang->getNamespaces() ; return $ns[NS_SPECIAL] ; } -# Entry point +/** + * Entry point + */ function wfSpecialMaintenance( $par=NULL ) { - global $wgUser, $wgOut, $wgLang, $wgTitle, $wgRequest, $wgLanguageCode; + global $wgUser, $wgOut, $wgContLang, $wgTitle, $wgRequest, $wgContLanguageCode; global $wgMiserMode; # This pages is expensive ressource wise @@ -44,7 +53,7 @@ function wfSpecialMaintenance( $par=NULL ) { if ( !is_null( $submitmll ) ) return wfSpecialMissingLanguageLinks() ; $sk = $wgUser->getSkin(); - $ns = $wgLang->getNamespaces() ; + $ns = $wgContLang->getNamespaces() ; # Generate page output @@ -71,10 +80,10 @@ function wfSpecialMaintenance( $par=NULL ) { $r .= "\">\n" ; $r .= "\n" ; @@ -84,7 +93,9 @@ function wfSpecialMaintenance( $par=NULL ) { $wgOut->addHTML ( $r ) ; } -# Generate a maintenance page link +/** + * Generate a maintenance page link + */ function getMPL ( $x ) { global $wgUser , $wgLang; $sk = $wgUser->getSkin() ; @@ -93,9 +104,9 @@ function getMPL ( $x ) { function getMaintenancePageBacklink( $subfunction ) { - global $wgUser , $wgLang; + global $wgUser , $wgContLang; $sk = $wgUser->getSkin() ; - $ns = $wgLang->getNamespaces() ; + $ns = $wgContLang->getNamespaces() ; $r = $sk->makeKnownLink ( $ns[-1].':Maintenance', wfMsg( 'maintenancebacklink' ) ) ; @@ -108,8 +119,12 @@ function getMaintenancePageBacklink( $subfunction ) { } -# Disambiguations, DoubleRedirects and BrokenRedirects are now using the -# QueryPage class. Code is in a Special*.php file. +/**#@+ + * Disambiguations, DoubleRedirects and BrokenRedirects are now using the + * QueryPage class. Code is in a Special*.php file. + * + * @deprecated + */ function wfSpecialDoubleRedirects() { global $wgOut; $t = Title::makeTitle( NS_SPECIAL, "DoubleRedirects" ); @@ -127,10 +142,15 @@ function wfSpecialDisambiguations() { $t = Title::makeTitle( NS_SPECIAL, "Disambiguations" ); $wgOut->redirect ($t->getFullURL()); } +/**#@-*/ -# This doesn't really work anymore, because self-links are now displayed as -# unlinked bold text, and are not entered into the link table. +/** + * This doesn't really work anymore, because self-links are now displayed as + * unlinked bold text, and are not entered into the link table. + * + * @deprecated + */ function wfSpecialSelfLinks() { global $wgUser, $wgOut, $wgLang, $wgTitle; $fname = 'wfSpecialSelfLinks'; @@ -164,9 +184,11 @@ function wfSpecialSelfLinks() { $wgOut->addHTML( "

{$sl}\n" ); } - +/** + * + */ function wfSpecialMispeelings () { - global $wgUser, $wgOut, $wgLang, $wgTitle; + global $wgUser, $wgOut, $wgContLang, $wgTitle; $sk = $wgUser->getSkin(); $fname = 'wfSpecialMispeelings'; @@ -177,7 +199,7 @@ function wfSpecialMispeelings () { # Determine page name $ms = wfMsg ( 'mispeelingspage' ) ; $mss = str_replace ( ' ' , '_' , $ms ); - $msp = $wgLang->getNsText(4).':'.$ms ; + $msp = $wgContLang->getNsText(4).':'.$ms ; $msl = $sk->makeKnownLink ( $msp ) ; # Load list from database @@ -197,7 +219,7 @@ function wfSpecialMispeelings () { $x = preg_replace( '/^(\S+).*$/', '$1', $x ); $sql = "SELECT DISTINCT cur_title FROM $cur,$searchindex WHERE cur_id=si_page AND ". "cur_namespace=0 AND cur_is_redirect=0 AND " . - "(MATCH(si_text) AGAINST ('" . $dbr->strencode( $wgLang->stripForSearch( $x ) ) . "'))" ; + "(MATCH(si_text) AGAINST ('" . $dbr->strencode( $wgContLang->stripForSearch( $x ) ) . "'))" ; $res = $dbr->query( $sql, $fname ); while ( $obj = $dbr->fetchObject ( $res ) ) { if ( $cnt >= $offset AND $cnt < $offset+$limit ) { @@ -231,9 +253,11 @@ function wfSpecialMispeelings () { $wgOut->addHTML( "

{$sl}\n" ); } - +/** + * + */ function wfSpecialMissingLanguageLinks() { - global $wgUser, $wgOut, $wgLang, $wgTitle, $wgRequest; + global $wgUser, $wgOut, $wgContLang, $wgTitle, $wgRequest; $fname = 'wfSpecialMissingLanguageLinks'; $thelang = $wgRequest->getText( 'thelang' ); @@ -251,7 +275,7 @@ function wfSpecialMissingLanguageLinks() { $res = $dbr->query( $sql, $fname ); - $mll = wfMsg( 'missinglanguagelinkstext', $wgLang->getLanguageName($thelang) ); + $mll = wfMsg( 'missinglanguagelinkstext', $wgContLang->getLanguageName($thelang) ); $top = getMaintenancePageBacklink( 'missinglanguagelinks' ); $top .= "

$mll


";