* that is done by showResults()
*/
function powersearch() {
- global $wgUser, $wgOut, $wgLang, $wgTitle, $wgRequest;
+ global $wgUser, $wgOut, $wgContLang, $wgTitle, $wgRequest;
$sk =& $wgUser->getSkin();
$search = $this->rawText;
}
# Do namespace checkboxes
- $namespaces = $wgLang->getNamespaces();
+ $namespaces = $wgContLang->getNamespaces();
foreach ( $namespaces as $i => $namespace ) {
# Skip virtual namespaces
if ( $i < 0 ) {
}
function parseQuery3() {
- global $wgDBminWordLen, $wgLang;
+ global $wgDBminWordLen, $wgContLang;
# on non mysql4 database: get list of words we don't want to search for
require_once( 'FulltextStoplist.php' );
$last = $cond = '';
foreach ( $w as $word ) {
- $word = $wgLang->stripForSearch( $word );
+ $word = $wgContLang->stripForSearch( $word );
if ( 'and' == $word || 'or' == $word || 'not' == $word
|| '(' == $word || ')' == $word ) {
$cond .= ' ' . strtoupper( $word );
}
function parseQuery4() {
- global $wgLang;
+ global $wgContLang;
$lc = SearchEngine::legalSearchChars();
$searchon = '';
$this->searchTerms = array();
if( $this->strictMatching && ($terms[1] == '') ) {
$terms[1] = '+';
}
- $searchon .= $terms[1] . $wgLang->stripForSearch( $terms[2] );
+ $searchon .= $terms[1] . $wgContLang->stripForSearch( $terms[2] );
if( !empty( $terms[3] ) ) {
$regexp = preg_quote( $terms[3] );
if( $terms[4] ) $regexp .= "[0-9A-Za-z_]+";
}
function showHit( $row ) {
- global $wgUser, $wgOut, $wgLang;
+ global $wgUser, $wgOut, $wgContLang;
$t = Title::makeName( $row->cur_namespace, $row->cur_title );
if( is_null( $t ) ) {
continue;
}
- $pre = $wgLang->truncate( $m[1], -$contextchars, '...' );
+ $pre = $wgContLang->truncate( $m[1], -$contextchars, '...' );
if ( count( $m ) < 3 ) {
$post = '';
} else {
- $post = $wgLang->truncate( $m[3], $contextchars, '...' );
+ $post = $wgContLang->truncate( $m[3], $contextchars, '...' );
}
$found = $m[2];
* @static
*/
function doFuzzyTitleSearch( $search, $namespace ){
- global $wgLang, $wgOut;
+ global $wgContLang, $wgOut;
$this->setupPage();
$wikitext = '';
foreach($fuzzymatches as $res){
$t = str_replace('_', ' ', $res[1]);
- $tfull = $wgLang->getNsText( $namespace ) . ":$t|$t";
+ $tfull = $wgContLang->getNsText( $namespace ) . ":$t|$t";
if( $namespace == NS_MAIN )
$tfull = $t;
$distance = $res[0];
}
if( $wikitext ){
if( $namespace != NS_MAIN )
- $wikitext = '=== ' . $wgLang->getNsText( $namespace ) . " ===\n" . $wikitext;
+ $wikitext = '=== ' . $wgContLang->getNsText( $namespace ) . " ===\n" . $wikitext;
$wgOut->addWikiText( $wikitext );
return true;
}
}
function doUpdate() {
- global $wgDBminWordLen, $wgLang, $wgDisableSearchUpdate;
+ global $wgDBminWordLen, $wgContLang, $wgDisableSearchUpdate;
if( $wgDisableSearchUpdate || !$this->mId ) {
return false;
}
# Language-specific strip/conversion
- $text = $wgLang->stripForSearch( $this->mText );
+ $text = $wgContLang->stripForSearch( $this->mText );
wfProfileIn( $fname.'-regexps' );
$text = preg_replace( "/<\\/?\\s*[A-Za-z][A-Za-z0-9]*\\s*([^>]*?)>/",
}
function getHeadScripts() {
- global $wgStylePath, $wgUser, $wgLang, $wgAllowUserJs;
+ global $wgStylePath, $wgUser, $wgContLang, $wgAllowUserJs;
$r = "<script type=\"text/javascript\" src=\"{$wgStylePath}/common/wikibits.js\"></script>\n";
if( $wgAllowUserJs && $wgUser->getID() != 0 ) { # logged in
- $userpage = $wgLang->getNsText( Namespace::getUser() ) . ":" . $wgUser->getName();
+ $userpage = $wgContLang->getNsText( Namespace::getUser() ) . ":" . $wgUser->getName();
$userjs = htmlspecialchars($this->makeUrl($userpage.'/'.$this->getSkinName().'.js', 'action=raw&ctype=text/javascript'));
$r .= '<script type="text/javascript" src="'.$userjs."\"></script>\n";
}
# get the user/site-specific stylesheet, SkinPHPTal called from RawPage.php (settings are cached that way)
function getUserStylesheet() {
- global $wgOut, $wgStylePath, $wgLang, $wgUser, $wgRequest, $wgTitle, $wgAllowUserCss;
+ global $wgOut, $wgStylePath, $wgContLang, $wgUser, $wgRequest, $wgTitle, $wgAllowUserCss;
$sheet = $this->getStylesheet();
$action = $wgRequest->getText('action');
$s = "@import \"$wgStylePath/$sheet\";\n";
- if($wgLang->isRTL()) $s .= "@import \"$wgStylePath/common/common_rtl.css\";\n";
+ if($wgContLang->isRTL()) $s .= "@import \"$wgStylePath/common/common_rtl.css\";\n";
if( $wgAllowUserCss && $wgUser->getID() != 0 ) { # logged in
if($wgTitle->isCssSubpage() and $action == 'submit' and $wgTitle->userCanEditCssJsSubpage()) {
$s .= $wgRequest->getText('wpTextbox1');
} else {
- $userpage = $wgLang->getNsText( Namespace::getUser() ) . ":" . $wgUser->getName();
+ $userpage = $wgContLang->getNsText( Namespace::getUser() ) . ":" . $wgUser->getName();
$s.= '@import "'.$this->makeUrl($userpage.'/'.$this->getSkinName().'.css', 'action=raw&ctype=text/css').'";'."\n";
}
}
* Some styles that are set by user through the user settings interface.
*/
function doGetUserStyles() {
- global $wgUser, $wgLang;
+ global $wgUser, $wgContLang;
- $csspage = $wgLang->getNsText( NS_MEDIAWIKI ) . ':' . $this->getSkinName() . '.css';
+ $csspage = $wgContLang->getNsText( NS_MEDIAWIKI ) . ':' . $this->getSkinName() . '.css';
$s = '@import "'.$this->makeUrl($csspage, 'action=raw&ctype=text/css')."\";\n";
if ( 1 == $wgUser->getOption( 'underline' ) ) {
}
function getExternalLinkAttributes( $link, $text, $class='' ) {
- global $wgUser, $wgOut, $wgLang;
+ global $wgUser, $wgOut, $wgContLang;
$same = ($link == $text);
$link = urldecode( $link );
- $link = $wgLang->checkTitleEncoding( $link );
+ $link = $wgContLang->checkTitleEncoding( $link );
$link = str_replace( '_', ' ', $link );
$link = htmlspecialchars( $link );
}
function doBeforeContent() {
- global $wgUser, $wgOut, $wgTitle, $wgLang, $wgSiteNotice;
+ global $wgUser, $wgOut, $wgTitle, $wgContLang, $wgSiteNotice;
$fname = 'Skin::doBeforeContent';
wfProfileIn( $fname );
$shove = ($qb != 0);
$left = ($qb == 1 || $qb == 3);
- if($wgLang->isRTL()) $left = !$left;
+ if($wgContLang->isRTL()) $left = !$left;
if ( !$shove ) {
$s .= "<td class='top' align='left' valign='top' rowspan='{$rows}'>\n" .
} elseif( $left ) {
$s .= $this->getQuickbarCompensator( $rows );
}
- $l = $wgLang->isRTL() ? 'right' : 'left';
+ $l = $wgContLang->isRTL() ? 'right' : 'left';
$s .= "<td {$borderhack} align='$l' valign='top'>\n";
$s .= $this->topLinks() ;
$s .= "<p class='subtitle'>" . $this->pageTitleLinks() . "</p>\n";
- $r = $wgLang->isRTL() ? "left" : "right";
+ $r = $wgContLang->isRTL() ? "left" : "right";
$s .= "</td>\n<td {$borderhack} valign='top' align='$r' nowrap='nowrap'>";
$s .= $this->nameAndLogin();
$s .= "\n<br />" . $this->searchForm() . "</td>";
}
function doAfterContent() {
- global $wgUser, $wgOut, $wgLang;
+ global $wgUser, $wgOut, $wgContLang;
$fname = 'Skin::doAfterContent';
wfProfileIn( $fname );
wfProfileIn( $fname.'-1' );
$qb = $this->qbSetting();
$shove = ($qb != 0);
$left = ($qb == 1 || $qb == 3);
- if($wgLang->isRTL()) $left = !$left;
+ if($wgContLang->isRTL()) $left = !$left;
if ( $shove && $left ) { # Left
$s .= $this->getQuickbarCompensator();
}
wfProfileOut( $fname.'-2' );
wfProfileIn( $fname.'-3' );
- $l = $wgLang->isRTL() ? 'right' : 'left';
+ $l = $wgContLang->isRTL() ? 'right' : 'left';
$s .= "<td class='bottom' align='$l' valign='top'>";
$s .= $this->bottomLinks();
}
function pageTitleLinks() {
- global $wgOut, $wgTitle, $wgUser, $wgLang, $wgUseApproval, $wgRequest;
+ global $wgOut, $wgTitle, $wgUser, $wgContLang, $wgUseApproval, $wgRequest;
extract( $wgRequest->getValues( 'oldid', 'diff' ) );
$action = $wgRequest->getText( 'action' );
if(!(strcmp($wgTitle->getText(),$wgUser->getName()) == 0 &&
$wgTitle->getNamespace()==Namespace::getTalk(Namespace::getUser()))) {
$n =$wgUser->getName();
- $tl = $this->makeKnownLink( $wgLang->getNsText(
+ $tl = $this->makeKnownLink( $wgContLang->getNsText(
Namespace::getTalk( Namespace::getUser() ) ) . ":{$n}",
wfMsg('newmessageslink') );
$s.= ' | <strong>'. wfMsg( 'newmessages', $tl ) . '</strong>';
}
function getUndeleteLink() {
- global $wgUser, $wgTitle, $wgLang, $action;
+ global $wgUser, $wgTitle, $wgContLang, $action;
if( $wgUser->isSysop() &&
(($wgTitle->getArticleId() == 0) || ($action == "history")) &&
($n = $wgTitle->isDeleted() ) ) {
return wfMsg( 'thisisdeleted',
$this->makeKnownLink(
- $wgLang->SpecialPage( 'Undelete/' . $wgTitle->getPrefixedDBkey() ),
+ $wgContLang->SpecialPage( 'Undelete/' . $wgTitle->getPrefixedDBkey() ),
wfMsg( 'restorelink', $n ) ) );
}
return '';
}
function nameAndLogin() {
- global $wgUser, $wgTitle, $wgLang, $wgShowIPinHeader, $wgIP;
+ global $wgUser, $wgTitle, $wgLang, $wgContLang, $wgShowIPinHeader, $wgIP;
- $li = $wgLang->specialPage( 'Userlogin' );
- $lo = $wgLang->specialPage( 'Userlogout' );
+ $li = $wgContLang->specialPage( 'Userlogin' );
+ $lo = $wgContLang->specialPage( 'Userlogout' );
$s = '';
if ( 0 == $wgUser->getID() ) {
if( $wgShowIPinHeader && isset( $_COOKIE[ini_get('session.name')] ) ) {
$n = $wgIP;
- $tl = $this->makeKnownLink( $wgLang->getNsText(
+ $tl = $this->makeKnownLink( $wgContLang->getNsText(
Namespace::getTalk( Namespace::getUser() ) ) . ":{$n}",
- $wgLang->getNsText( Namespace::getTalk( 0 ) ) );
+ $wgContLang->getNsText( Namespace::getTalk( 0 ) ) );
$s .= $n . ' ('.$tl.')';
} else {
} else {
$n = $wgUser->getName();
$rt = $wgTitle->getPrefixedURL();
- $tl = $this->makeKnownLink( $wgLang->getNsText(
+ $tl = $this->makeKnownLink( $wgContLang->getNsText(
Namespace::getTalk( Namespace::getUser() ) ) . ":{$n}",
- $wgLang->getNsText( Namespace::getTalk( 0 ) ) );
+ $wgContLang->getNsText( Namespace::getTalk( 0 ) ) );
$tl = " ({$tl})";
- $s .= $this->makeKnownLink( $wgLang->getNsText(
+ $s .= $this->makeKnownLink( $wgContLang->getNsText(
Namespace::getUser() ) . ":{$n}", $n ) . "{$tl}<br />" .
$this->makeKnownLink( $lo, wfMsg( 'logout' ),
"returnto={$rt}" ) . ' | ' .
}
function quickBar() {
- global $wgOut, $wgTitle, $wgUser, $wgRequest, $wgLang;
+ global $wgOut, $wgTitle, $wgUser, $wgRequest, $wgContLang;
global $wgDisableUploads, $wgRemoteUploads;
$fname = 'Skin::quickBar';
. $sep . $this->specialLink( 'randompage' );
if ($wgUser->getID()) {
$s.= $sep . $this->specialLink( 'watchlist' ) ;
- $s .= $sep .$this->makeKnownLink( $wgLang->specialPage( 'Contributions' ),
+ $s .= $sep .$this->makeKnownLink( $wgContLang->specialPage( 'Contributions' ),
wfMsg( 'mycontris' ), 'target=' . wfUrlencode($wgUser->getName() ) );
}
}
$link = $wgTitle->getText();
- if ($nstext = $wgLang->getNsText($tns) ) { # add namespace if necessary
+ if ($nstext = $wgContLang->getNsText($tns) ) { # add namespace if necessary
$link = $nstext . ':' . $link ;
}
}
function specialPagesList() {
- global $wgUser, $wgOut, $wgLang, $wgServer, $wgRedirectScript;
+ global $wgUser, $wgOut, $wgContLang, $wgServer, $wgRedirectScript;
require_once('SpecialPage.php');
$a = array();
$pages = SpecialPage::getPages();
}
$go = wfMsg( 'go' );
$sp = wfMsg( 'specialpages' );
- $spp = $wgLang->specialPage( 'Specialpages' );
+ $spp = $wgContLang->specialPage( 'Specialpages' );
$s = '<form id="specialpages" method="get" class="inline" ' .
'action="' . htmlspecialchars( "{$wgServer}{$wgRedirectScript}" ) . "\">\n";
$s .= "<option value=\"{$spp}\">{$sp}</option>\n";
foreach ( $a as $name => $desc ) {
- $p = $wgLang->specialPage( $name );
+ $p = $wgContLang->specialPage( $name );
$s .= "<option value=\"{$p}\">{$desc}</option>\n";
}
$s .= "</select>\n";
}
function moveThisPage() {
- global $wgTitle, $wgLang;
+ global $wgTitle, $wgContLang;
if ( $wgTitle->userCanEdit() ) {
- $s = $this->makeKnownLink( $wgLang->specialPage( 'Movepage' ),
+ $s = $this->makeKnownLink( $wgContLang->specialPage( 'Movepage' ),
wfMsg( 'movethispage' ), 'target=' . $wgTitle->getPrefixedURL() );
} // no message if page is protected - would be redundant
return $s;
}
function whatLinksHere() {
- global $wgTitle, $wgLang;
+ global $wgTitle, $wgContLang;
- $s = $this->makeKnownLink( $wgLang->specialPage( 'Whatlinkshere' ),
+ $s = $this->makeKnownLink( $wgContLang->specialPage( 'Whatlinkshere' ),
wfMsg( 'whatlinkshere' ), 'target=' . $wgTitle->getPrefixedURL() );
return $s;
}
function userContribsLink() {
- global $wgTitle, $wgLang;
+ global $wgTitle, $wgContLang;
- $s = $this->makeKnownLink( $wgLang->specialPage( 'Contributions' ),
+ $s = $this->makeKnownLink( $wgContLang->specialPage( 'Contributions' ),
wfMsg( 'contributions' ), 'target=' . $wgTitle->getPartialURL() );
return $s;
}
function emailUserLink() {
- global $wgTitle, $wgLang;
+ global $wgTitle, $wgContLang;
- $s = $this->makeKnownLink( $wgLang->specialPage( 'Emailuser' ),
+ $s = $this->makeKnownLink( $wgContLang->specialPage( 'Emailuser' ),
wfMsg( 'emailuser' ), 'target=' . $wgTitle->getPartialURL() );
return $s;
}
function watchPageLinksLink() {
- global $wgOut, $wgTitle, $wgLang;
+ global $wgOut, $wgTitle, $wgContLang;
if ( ! $wgOut->isArticleRelated() ) {
$s = '(' . wfMsg( 'notanarticle' ) . ')';
} else {
- $s = $this->makeKnownLink( $wgLang->specialPage(
+ $s = $this->makeKnownLink( $wgContLang->specialPage(
'Recentchangeslinked' ), wfMsg( 'recentchangeslinked' ),
'target=' . $wgTitle->getPrefixedURL() );
}
}
function otherLanguages() {
- global $wgOut, $wgLang, $wgTitle, $wgUseNewInterlanguage;
+ global $wgOut, $wgContLang, $wgTitle, $wgUseNewInterlanguage;
$a = $wgOut->getLanguageLinks();
if ( 0 == count( $a ) ) {
if ( !$wgUseNewInterlanguage ) return '';
- $ns = $wgLang->getNsIndex ( $wgTitle->getNamespace () ) ;
+ $ns = $wgContLang->getNsIndex ( $wgTitle->getNamespace () ) ;
if ( $ns != 0 AND $ns != 1 ) return '' ;
$pn = 'Intl' ;
$x = 'mode=addlink&xt='.$wgTitle->getDBkey() ;
- return $this->makeKnownLink( $wgLang->specialPage( $pn ),
+ return $this->makeKnownLink( $wgContLang->specialPage( $pn ),
wfMsg( 'intl' ) , $x );
}
if ( !$wgUseNewInterlanguage ) {
$s = wfMsg( 'otherlanguages' ) . ': ';
} else {
- global $wgLanguageCode ;
+ global $wgContLanguageCode ;
$x = 'mode=zoom&xt='.$wgTitle->getDBkey() ;
- $x .= '&xl='.$wgLanguageCode ;
- $s = $this->makeKnownLink( $wgLang->specialPage( 'Intl' ),
+ $x .= '&xl='.$wgContLanguageCode ;
+ $s = $this->makeKnownLink( $wgContLang->specialPage( 'Intl' ),
wfMsg( 'otherlanguages' ) , $x ) . ': ' ;
}
$s = wfMsg( 'otherlanguages' ) . ': ';
$first = true;
- if($wgLang->isRTL()) $s .= '<span dir="LTR">';
+ if($wgContLang->isRTL()) $s .= '<span dir="LTR">';
foreach( $a as $l ) {
if ( ! $first ) { $s .= ' | '; }
$first = false;
$nt = Title::newFromText( $l );
$url = $nt->getFullURL();
- $text = $wgLang->getLanguageName( $nt->getInterwiki() );
+ $text = $wgContLang->getLanguageName( $nt->getInterwiki() );
if ( '' == $text ) { $text = $l; }
$style = $this->getExternalLinkAttributes( $l, $text );
$s .= "<a href=\"{$url}\"{$style}>{$text}</a>";
}
- if($wgLang->isRTL()) $s .= '</span>';
+ if($wgContLang->isRTL()) $s .= '</span>';
return $s;
}
}
function talkLink() {
- global $wgLang, $wgTitle, $wgLinkCache;
+ global $wgContLang, $wgTitle, $wgLinkCache;
$tns = $wgTitle->getNamespace();
if ( -1 == $tns ) { return ''; }
$lns = Namespace::getTalk( $tns );
$text=$tp;
}
- $n = $wgLang->getNsText( $lns );
+ $n = $wgContLang->getNsText( $lns );
if ( '' == $n ) { $link = $pn; }
else { $link = $n.':'.$pn; }
}
function commentLink() {
- global $wgLang, $wgTitle, $wgLinkCache;
+ global $wgContLang, $wgTitle, $wgLinkCache;
$tns = $wgTitle->getNamespace();
if ( -1 == $tns ) { return ''; }
# assert Namespace::isTalk( $lns )
- $n = $wgLang->getNsText( $lns );
+ $n = $wgContLang->getNsText( $lns );
$pn = $wgTitle->getText();
$link = $n.':'.$pn;
}
function makeImageLinkObj( $nt, $alt = '' ) {
- global $wgLang, $wgUseImageResize;
+ global $wgContLang, $wgUseImageResize;
$img = Image::newFromTitle( $nt );
$url = $img->getURL();
# If thumbnail width has not been provided, it is set
# here to 180 pixels
if ( $align == '' ) {
- $align = $wgLang->isRTL() ? 'left' : 'right';
+ $align = $wgContLang->isRTL() ? 'left' : 'right';
}
if ( ! isset($width) ) {
$width = 180;
* $img is an Image object
*/
function makeThumbLinkObj( $img, $label = '', $align = 'right', $boxwidth = 180, $boxheight=false, $framed=false , $manual_thumb = "" ) {
- global $wgStylePath, $wgLang;
+ global $wgStylePath, $wgContLang;
# $image = Title::makeTitleSafe( NS_IMAGE, $name );
$url = $img->getURL();
$u = $img->getEscapeLocalURL();
$more = htmlspecialchars( wfMsg( 'thumbnail-more' ) );
- $magnifyalign = $wgLang->isRTL() ? 'left' : 'right';
- $textalign = $wgLang->isRTL() ? ' style="text-align:right"' : '';
+ $magnifyalign = $wgContLang->isRTL() ? 'left' : 'right';
+ $textalign = $wgContLang->isRTL() ? ' style="text-align:right"' : '';
$s = "<div class=\"thumb t{$align}\"><div style=\"width:{$oboxwidth}px;\">";
if ( $thumbUrl == '' ) {
}
function specialLink( $name, $key = '' ) {
- global $wgLang;
+ global $wgContLang;
if ( '' == $key ) { $key = strtolower( $name ); }
- $pn = $wgLang->ucfirst( $name );
- return $this->makeKnownLink( $wgLang->specialPage( $pn ),
+ $pn = $wgContLang->ucfirst( $name );
+ return $this->makeKnownLink( $wgContLang->specialPage( $pn ),
wfMsg( $key ) );
}
* Enhanced RC ungrouped line
*/
function recentChangesBlockLine ( $rcObj ) {
- global $wgStylePath, $wgLang ;
+ global $wgStylePath, $wgContLang ;
# Get rc_xxxx variables
extract( $rcObj->mAttribs ) ;
# Comment
if ( $rc_comment != '' && $rc_type != RC_MOVE && $rc_type != RC_MOVE_OVER_REDIRECT ) {
$rc_comment=$this->formatComment($rc_comment, $rcObj->getTitle());
- $r .= $wgLang->emphasize( ' ('.$rc_comment.')' );
+ $r .= $wgContLang->emphasize( ' ('.$rc_comment.')' );
}
$r .= "<br />\n" ;
* Enhanced RC group
*/
function recentChangesBlockGroup ( $block ) {
- global $wgStylePath, $wgLang ;
+ global $wgStylePath, $wgContLang ;
$r = '' ;
$M = wfMsg( 'minoreditletter' );
$rcl = 'RCL'.$this->rcCacheIndex ;
$rcm = 'RCM'.$this->rcCacheIndex ;
$toggleLink = "javascript:toggleVisibility('$rci','$rcm','$rcl')" ;
- $arrowdir = $wgLang->isRTL() ? 'l' : 'r';
+ $arrowdir = $wgContLang->isRTL() ? 'l' : 'r';
$tl = '<span id="'.$rcm.'"><a href="'.$toggleLink.'"><img src="'.$wgStylePath.'/common/images/Arr_'.$arrowdir.'.png" width="12" height="12" /></a></span>' ;
$tl .= '<span id="'.$rcl.'" style="display:none"><a href="'.$toggleLink.'"><img src="'.$wgStylePath.'/common/images/Arr_d.png" width="12" height="12" /></a></span>' ;
$r .= $tl ;
$r .= $rcObj->usertalklink ;
if ( $rc_comment != '' ) {
$rc_comment=$this->formatComment($rc_comment, $rcObj->getTitle());
- $r .= $wgLang->emphasize( ' ('.$rc_comment.')' ) ;
+ $r .= $wgContLang->emphasize( ' ('.$rc_comment.')' ) ;
}
$r .= "<br />\n" ;
}
}
function recentChangesLineOld( &$rc, $watched = false ) {
- global $wgTitle, $wgLang, $wgUser, $wgRCSeconds, $wgUseRCPatrol, $wgOnlySysopsCanPatrol;
+ global $wgTitle, $wgLang, $wgContLang, $wgUser, $wgRCSeconds, $wgUseRCPatrol, $wgOnlySysopsCanPatrol;
# Extract DB fields into local scope
extract( $rc->mAttribs );
$curIdEq = 'curid=' . $rc_cur_id;
# Make date header if necessary
- $date = $wgLang->date( $rc_timestamp, true);
+ $date = $wgContLang->date( $rc_timestamp, true);
+ $uidate = $wgLang->date( $rc_timestamp, true);
$s = '';
if ( $date != $this->lastdate ) {
if ( '' != $this->lastdate ) { $s .= "</ul>\n"; }
- $s .= "<h4>{$date}</h4>\n<ul class='special'>";
+ $s .= "<h4>{$uidate}</h4>\n<ul class='special'>";
$this->lastdate = $date;
$this->rclistOpen = true;
}
# User link (or contributions for unregistered users)
if ( 0 == $rc_user ) {
- $userLink = $this->makeKnownLink( $wgLang->specialPage( 'Contributions' ),
+ $userLink = $this->makeKnownLink( $wgContLang->specialPage( 'Contributions' ),
$rc_user_text, 'target=' . $rc_user_text );
} else {
- $userLink = $this->makeLink( $wgLang->getNsText( NS_USER ) . ':'.$rc_user_text, $rc_user_text );
+ $userLink = $this->makeLink( $wgContLang->getNsText( NS_USER ) . ':'.$rc_user_text, $rc_user_text );
}
$s .= $userLink;
# User talk link
- $talkname=$wgLang->getNsText(NS_TALK); # use the shorter name
+ $talkname=$wgContLang->getNsText(NS_TALK); # use the shorter name
global $wgDisableAnonTalk;
if( 0 == $rc_user && $wgDisableAnonTalk ) {
$userTalkLink = '';
} else {
- $utns=$wgLang->getNsText(NS_USER_TALK);
+ $utns=$wgContLang->getNsText(NS_USER_TALK);
$userTalkLink= $this->makeLink($utns . ':'.$rc_user_text, $talkname );
}
# Block link
$blockLink='';
if ( ( 0 == $rc_user ) && $wgUser->isSysop() ) {
- $blockLink = $this->makeKnownLink( $wgLang->specialPage(
+ $blockLink = $this->makeKnownLink( $wgContLang->specialPage(
'Blockip' ), wfMsg( 'blocklink' ), 'ip='.$rc_user_text );
}
# Add comment
if ( '' != $rc_comment && '*' != $rc_comment && $rc_type != RC_MOVE && $rc_type != RC_MOVE_OVER_REDIRECT ) {
$rc_comment=$this->formatComment($rc_comment,$rc->getTitle());
- $s .= $wgLang->emphasize(' (' . $rc_comment . ')');
+ $s .= $wgContLang->emphasize(' (' . $rc_comment . ')');
}
$s .= "</li>\n";
}
function recentChangesLineNew( &$baseRC, $watched = false ) {
- global $wgTitle, $wgLang, $wgUser, $wgRCSeconds;
+ global $wgTitle, $wgLang, $wgContLang, $wgUser, $wgRCSeconds;
# Create a specialised object
$rc = RCCacheEntry::newFromParent( $baseRC ) ;
$curIdEq = 'curid=' . $rc_cur_id;
# If it's a new day, add the headline and flush the cache
- $date = $wgLang->date( $rc_timestamp, true);
+ $date = $wgContLang->date( $rc_timestamp, true);
+ $uidate = $wgLang->date( $rc_timestamp, true);
$ret = '';
if ( $date != $this->lastdate ) {
# Process current cache
$ret = $this->recentChangesBlock () ;
$this->rc_cache = array() ;
- $ret .= "<h4>{$date}</h4>\n";
+ $ret .= "<h4>{$uidate}</h4>\n";
$this->lastdate = $date;
}
$clink = $this->makeKnownLinkObj( $rc->getTitle(), '' ) ;
}
- $time = $wgLang->time( $rc_timestamp, true, $wgRCSeconds );
+ $time = $wgContLang->time( $rc_timestamp, true, $wgRCSeconds );
$rc->watched = $watched ;
$rc->link = $clink ;
$rc->timestamp = $time;
# Make user link (or user contributions for unregistered users)
if ( $rc_user == 0 ) {
- $userLink = $this->makeKnownLink( $wgLang->specialPage( 'Contributions' ),
+ $userLink = $this->makeKnownLink( $wgContLang->specialPage( 'Contributions' ),
$rc_user_text, 'target=' . $rc_user_text );
} else {
- $userLink = $this->makeLink( $wgLang->getNsText(
+ $userLink = $this->makeLink( $wgContLang->getNsText(
Namespace::getUser() ) . ':'.$rc_user_text, $rc_user_text );
}
$rc->difflink = $diffLink;
# Make user talk link
- $utns=$wgLang->getNsText(NS_USER_TALK);
- $talkname=$wgLang->getNsText(NS_TALK); # use the shorter name
+ $utns=$wgContLang->getNsText(NS_USER_TALK);
+ $talkname=$wgContLang->getNsText(NS_TALK); # use the shorter name
$userTalkLink= $this->makeLink($utns . ':'.$rc_user_text, $talkname );
global $wgDisableAnonTalk;
if ( ( 0 == $rc_user ) && $wgUser->isSysop() ) {
- $blockLink = $this->makeKnownLink( $wgLang->specialPage(
+ $blockLink = $this->makeKnownLink( $wgContLang->specialPage(
'Blockip' ), wfMsg( 'blocklink' ), 'ip='.$rc_user_text );
if( $wgDisableAnonTalk )
$rc->usertalklink = ' ('.$blockLink.')';
* temporarily to a value pass. Should be adjusted further. --brion
*/
function formatComment($comment, $title = NULL) {
- global $wgLang;
+ global $wgContLang;
$comment = htmlspecialchars( $comment );
# The pattern for autogen comments is / * foo * /, which makes for
# format regular and media links - all other wiki formatting
# is ignored
- $medians = $wgLang->getNsText(Namespace::getMedia()).':';
+ $medians = $wgContLang->getNsText(Namespace::getMedia()).':';
while(preg_match('/\[\[(.*?)(\|(.*?))*\]\](.*)$/',$comment,$match)) {
# Handle link renaming [[foo|text]] will show link as "text"
if( "" != $match[3] ) {
}
function imageHistoryLine( $iscur, $timestamp, $img, $user, $usertext, $size, $description ) {
- global $wgUser, $wgLang, $wgTitle;
+ global $wgUser, $wgLang, $wgContLang, $wgTitle;
$datetime = $wgLang->timeanddate( $timestamp, true );
$del = wfMsg( 'deleteimg' );
if ( 0 == $user ) {
$userlink = $usertext;
} else {
- $userlink = $this->makeLink( $wgLang->getNsText( Namespace::getUser() ) .
+ $userlink = $this->makeLink( $wgContLang->getNsText( Namespace::getUser() ) .
':'.$usertext, $usertext );
}
$nbytes = wfMsg( 'nbytes', $size );
if ( '' != $description && '*' != $description ) {
$sk=$wgUser->getSkin();
- $s .= $wgLang->emphasize(' (' . $sk->formatComment($description,$wgTitle) . ')');
+ $s .= $wgContLang->emphasize(' (' . $sk->formatComment($description,$wgTitle) . ')');
}
$s .= "</li>\n";
return $s;
function editSectionLinkForOther( $title, $section ) {
global $wgRequest;
- global $wgUser, $wgLang;
+ global $wgUser, $wgContLang;
$title = Title::newFromText($title);
$editurl = '§ion='.$section;
$url = $this->makeKnownLink($title->getPrefixedText(),wfMsg('editsection'),'action=edit'.$editurl);
- if( $wgLang->isRTL() ) {
+ if( $wgContLang->isRTL() ) {
$farside = 'left';
$nearside = 'right';
} else {
function editSectionLink( $section ) {
global $wgRequest;
- global $wgTitle, $wgUser, $wgLang;
+ global $wgTitle, $wgUser, $wgContLang;
if( $wgRequest->getInt( 'oldid' ) && ( $wgRequest->getVal( 'diff' ) != '0' ) ) {
# Section edit links would be out of sync on an old page.
$editurl = '§ion='.$section;
$url = $this->makeKnownLink($wgTitle->getPrefixedText(),wfMsg('editsection'),'action=edit'.$editurl);
- if( $wgLang->isRTL() ) {
+ if( $wgContLang->isRTL() ) {
$farside = 'left';
$nearside = 'right';
} else {
* initialize various variables and generate the template
*/
function outputPage( &$out ) {
- global $wgTitle, $wgArticle, $wgUser, $wgLang, $wgOut;
- global $wgScript, $wgStylePath, $wgLanguageCode, $wgUseNewInterlanguage;
+ global $wgTitle, $wgArticle, $wgUser, $wgLang, $wgContLang, $wgOut;
+ global $wgScript, $wgStylePath, $wgLanguageCode, $wgContLanguageCode, $wgUseNewInterlanguage;
global $wgMimeType, $wgOutputEncoding, $wgUseDatabaseMessages, $wgRequest;
global $wgDisableCounters, $wgLogo, $action, $wgFeedClasses, $wgSiteNotice;
global $wgMaxCredits, $wgShowCreditsIfMax;
$this->iscontent = ($wgTitle->getNamespace() != Namespace::getSpecial() );
$this->iseditable = ($this->iscontent and !($action == 'edit' or $action == 'submit'));
$this->username = $wgUser->getName();
- $this->userpage = $wgLang->getNsText( Namespace::getUser() ) . ":" . $wgUser->getName();
+ $this->userpage = $wgContLang->getNsText( Namespace::getUser() ) . ":" . $wgUser->getName();
$this->userpageUrlDetails = $this->makeUrlDetails($this->userpage);
$this->usercss = $this->userjs = $this->userjsprev = false;
$tpl->set( 'searchaction', $this->escapeSearchLink() );
$tpl->setRef( 'stylepath', $wgStylePath );
$tpl->setRef( 'logopath', $wgLogo );
- $tpl->setRef( "lang", $wgLanguageCode );
- $tpl->set( 'dir', $wgLang->isRTL() ? "rtl" : "ltr" );
- $tpl->set( 'rtl', $wgLang->isRTL() );
- $tpl->set( 'langname', $wgLang->getLanguageName( $wgLanguageCode ) );
+ $tpl->setRef( "lang", $wgContLanguageCode );
+ $tpl->set( 'dir', $wgContLang->isRTL() ? "rtl" : "ltr" );
+ $tpl->set( 'rtl', $wgContLang->isRTL() );
+ $tpl->set( 'langname', $wgContLang->getLanguageName( $wgContLanguageCode ) );
$tpl->setRef( 'username', $this->username );
$tpl->setRef( 'userpage', $this->userpage);
$tpl->setRef( 'userpageurl', $this->userpageUrlDetails['href']);
$ntl = wfMsg( 'newmessages',
$this->makeKnownLink(
- $wgLang->getNsText( Namespace::getTalk( Namespace::getUser() ) )
+ $wgContLang->getNsText( Namespace::getTalk( Namespace::getUser() ) )
. ':' . $this->username,
wfMsg('newmessageslink') )
);
foreach( $wgOut->getLanguageLinks() as $l ) {
$nt = Title::newFromText( $l );
$language_urls[] = array('href' => $nt->getFullURL(),
- 'text' => ($wgLang->getLanguageName( $nt->getInterwiki()) != ''?$wgLang->getLanguageName( $nt->getInterwiki()) : $l),
- 'class' => $wgLang->isRTL() ? 'rtl' : 'ltr');
+ 'text' => ($wgContLang->getLanguageName( $nt->getInterwiki()) != ''?$wgContLang->getLanguageName( $nt->getInterwiki()) : $l),
+ 'class' => $wgContLang->isRTL() ? 'rtl' : 'ltr');
}
if(count($language_urls)) {
$tpl->setRef( 'language_urls', $language_urls);
* returns css with user-specific options
*/
function getUserStylesheet() {
- global $wgUser, $wgRequest, $wgTitle, $wgLang, $wgSquidMaxage, $wgStylePath;
+ global $wgUser, $wgRequest, $wgTitle, $wgContLang, $wgSquidMaxage, $wgStylePath;
$action = $wgRequest->getText('action');
$maxage = $wgRequest->getText('maxage');
$s = "/* generated user stylesheet */\n";
- if($wgLang->isRTL()) $s .= '@import "'.$wgStylePath.'/'.$this->stylename.'/rtl.css";'."\n";
+ if($wgContLang->isRTL()) $s .= '@import "'.$wgStylePath.'/'.$this->stylename.'/rtl.css";'."\n";
$s .= '@import "'.
$this->makeNSUrl(ucfirst($this->skinname).'.css', 'action=raw&ctype=text/css&smaxage='.$wgSquidMaxage, NS_MEDIAWIKI)."\";\n";
if($wgUser->getID() != 0) {
*
*/
function wfSpecialAllpages( $par=NULL ) {
- global $indexMaxperpage, $toplevelMaxperpage, $wgRequest, $wgOut, $wgLang;
+ global $indexMaxperpage, $toplevelMaxperpage, $wgRequest, $wgOut, $wgContLang;
$indexMaxperpage = 480;
$toplevelMaxperpage = 50;
$from = $wgRequest->getVal( 'from' );
$namespace = $wgRequest->getInt( 'namespace' );
- $names = $wgLang->getNamespaces();
+ $names = $wgContLang->getNamespaces();
if( !isset( $names[$namespace] ) ) {
$namespace = 0;
}
}
function namespaceForm ( $namespace = 0, $from = '' ) {
- global $wgLang, $wgScript;
+ global $wgContLang, $wgScript;
$t = Title::makeTitle( NS_SPECIAL, "Allpages" );
$namespaceselect = '<select name="namespace">';
- $arr = $wgLang->getNamespaces();
+ $arr = $wgContLang->getNamespaces();
for ( $i = 0; $i < 14; $i++ ) {
$namespacename = str_replace ( "_", " ", $arr[$i] );
$n = ($i == 0) ? wfMsg ( 'articlenamespace' ) : $namespacename;
}
function indexShowToplevel ( $namespace = 0 ) {
- global $wgOut, $indexMaxperpage, $toplevelMaxperpage, $wgLang, $wgRequest, $wgUser;
+ global $wgOut, $indexMaxperpage, $toplevelMaxperpage, $wgContLang, $wgRequest, $wgUser;
$sk = $wgUser->getSkin();
$fname = "indexShowToplevel";
$namespace = intval ($namespace);
$morelinks = "";
if ( $offset > 0 ) {
$morelinks = $sk->makeKnownLink (
- $wgLang->specialPage ( "Allpages" ),
+ $wgContLang->specialPage ( "Allpages" ),
wfMsg ( 'allpagesprev' ),
( $offset > $toplevelMaxperpage ) ? 'offset='.($offset-$toplevelMaxperpage) : ''
);
if ( $stopat < $sections-1 ) {
if ( $morelinks != "" ) { $morelinks .= " | "; }
$morelinks .= $sk->makeKnownLink (
- $wgLang->specialPage ( "Allpages" ),
+ $wgContLang->specialPage ( "Allpages" ),
wfMsg ( 'allpagesnext' ),
'offset=' . ($offset + $toplevelMaxperpage)
);
}
function indexShowChunk( $from, $namespace = 0 ) {
- global $wgOut, $wgUser, $indexMaxperpage, $wgLang;
+ global $wgOut, $wgUser, $indexMaxperpage, $wgContLang;
$sk = $wgUser->getSkin();
$maxPlusOne = $indexMaxperpage + 1;
$namespacee = intval($namespace);
$out2 = '<table style="background: inherit;" width="100%" cellpadding="0" cellspacing="0" border="0">';
$out2 .= '<tr valign="top"><td align="left">' . $nsForm;
$out2 .= '</td><td align="right" style="font-size: smaller; margin-bottom: 1em;">' .
- $sk->makeKnownLink( $wgLang->specialPage( "Allpages" ),
+ $sk->makeKnownLink( $wgContLang->specialPage( "Allpages" ),
wfMsg ( 'allpages' ) );
if ( ($n == $indexMaxperpage) && ($s = $dbr->fetchObject( $res )) ) {
$namespaceparam = $namespace ? "&namespace=$namespace" : "";
$out2 .= " | " . $sk->makeKnownLink(
- $wgLang->specialPage( "Allpages" ),
+ $wgContLang->specialPage( "Allpages" ),
wfMsg ( 'nextpage', $s->cur_title ),
"from=" . wfUrlEncode ( $s->cur_title ) . $namespaceparam );
}
}
function doSubmit() {
- global $wgOut, $wgUser, $wgServer, $wgScript, $wgArticlePath, $wgLang;
+ global $wgOut, $wgUser, $wgServer, $wgScript, $wgArticlePath, $wgLang, $wgContLang;
global $wgDBserver, $wgDBsqluser, $wgDBsqlpassword, $wgDBname, $wgSqlTimeout;
# Use a limit, folks!
foreach ( $a as $y ) {
$sTitle = htmlspecialchars( $y->cur_title );
if ( $y->cur_namespace ) {
- $sNamespace = $wgLang->getNsText( $y->cur_namespace );
+ $sNamespace = $wgContLang->getNsText( $y->cur_namespace );
$link = "$sNamespace:$sTitle";
} else {
$link = "$sTitle";
if( $x == "cur_title" ) $namespace = $y->cur_namespace;
if( $x == "old_title" ) $namespace = $y->old_namespace;
if( $x == "rc_title" ) $namespace = $y->rc_namespace;
- if( $namespace ) $o = $wgLang->getNsText( $namespace ) . ":" . $o;
+ if( $namespace ) $o = $wgContLang->getNsText( $namespace ) . ":" . $o;
$o = "<a href=\"" . wfLocalUrlE($o) . "\" class='internal'>" .
htmlspecialchars( $y->$x ) . "</a>" ;
} else {
}
function showList() {
- global $wgOut, $wgUser, $wgLang;
+ global $wgOut, $wgUser, $wgContLang;
$fname = "BookSourceList::showList()";
# First, see if we have a custom list setup in
# Otherwise, use the list of links in the default Language.php file.
$s = wfMsg( "booksourcetext" ) . "<ul>\n";
- $bs = $wgLang->getBookstoreList() ;
+ $bs = $wgContLang->getBookstoreList() ;
$bsn = array_keys ( $bs ) ;
foreach ( $bsn as $name ) {
$adr = $bs[$name] ;
}
function formatResult( $skin, $result ) {
- global $wgLang ;
+ global $wgContLang ;
- $ns = $wgLang->getNamespaces() ;
+ $ns = $wgContLang->getNamespaces() ; /* not used, why bother? */
$from = $skin->makeKnownLink( $result->cur_title ,'', 'redirect=no' );
$edit = $skin->makeBrokenLink( $result->cur_title , "(".wfMsg("qbedit").")" , 'redirect=no');
$to = $skin->makeBrokenLink( $result->bl_to );
* @param string $par (optional) user name of the user for which to show the contributions
*/
function wfSpecialContributions( $par = '' ) {
- global $wgUser, $wgOut, $wgLang, $wgRequest;
+ global $wgUser, $wgOut, $wgLang, $wgContLang, $wgRequest;
$fname = "wfSpecialContributions";
if( $par )
if ( $hideminor ) {
$cmq = "AND cur_minor_edit=0";
$omq = "AND old_minor_edit=0";
- $mlink = $sk->makeKnownLink( $wgLang->specialPage( "Contributions" ),
+ $mlink = $sk->makeKnownLink( $wgContLang->specialPage( "Contributions" ),
WfMsg( "show" ), "target=" . htmlspecialchars( $nt->getPrefixedURL() ) .
"&offset={$offset}&limit={$limit}&hideminor=0" );
} else {
$cmq = $omq = "";
- $mlink = $sk->makeKnownLink( $wgLang->specialPage( "Contributions" ),
+ $mlink = $sk->makeKnownLink( $wgContLang->specialPage( "Contributions" ),
WfMsg( "hide" ), "target=" . htmlspecialchars( $nt->getPrefixedURL() ) .
"&offset={$offset}&limit={$limit}&hideminor=1" );
}
$wgOut->addHTML( "<p>{$top}\n" );
$sl = wfViewPrevNext( $offset, $limit,
- $wgLang->specialpage( "Contributions" ),
+ $wgContLang->specialpage( "Contributions" ),
"hideminor={$hideminor}&target=" . wfUrlEncode( $target ),
($nCur + $nOld) <= $offlimit);
*
*/
function ucCountLink( $lim, $d ) {
- global $wgUser, $wgLang, $wgRequest;
+ global $wgUser, $wgContLang, $wgRequest;
$target = $wgRequest->getText( 'target' );
$sk = $wgUser->getSkin();
- $s = $sk->makeKnownLink( $wgLang->specialPage( "Contributions" ),
+ $s = $sk->makeKnownLink( $wgContLang->specialPage( "Contributions" ),
"{$lim}", "target={$target}&days={$d}&limit={$lim}" );
return $s;
}
*
*/
function ucDaysLink( $lim, $d ) {
- global $wgUser, $wgLang, $wgRequest;
+ global $wgUser, $wgContLang, $wgRequest;
$target = $wgRequest->getText( 'target' );
$sk = $wgUser->getSkin();
- $s = $sk->makeKnownLink( $wgLang->specialPage( "Contributions" ),
+ $s = $sk->makeKnownLink( $wgContLang->specialPage( "Contributions" ),
"{$d}", "target={$target}&days={$d}&limit={$lim}" );
return $s;
}
}
function formatResult( $skin, $result ) {
- global $wgLang ;
- $ns = $wgLang->getNamespaces() ;
+ global $wgContLang ;
+ $ns = $wgContLang->getNamespaces() ;
$from = $skin->makeKnownLink( $ns[$result->ns_art].':'.$result->title_art ,'');
$edit = $skin->makeBrokenLink( $ns[$result->ns_art].':'.$result->title_art , "(".wfMsg("qbedit").")" , 'redirect=no');
}
function formatResult( $skin, $result ) {
- global $wgLang ;
- $ns = $wgLang->getNamespaces() ;
+ global $wgContLang ;
+ $ns = $wgContLang->getNamespaces() ;
$from = $skin->makeKnownLink( $ns[$result->ns_a].':'.$result->title_a ,'', 'redirect=no' );
$edit = $skin->makeBrokenLink( $ns[$result->ns_a].':'.$result->title_a , "(".wfMsg("qbedit").")" , 'redirect=no');
$to = $skin->makeKnownLink( $ns[$result->ns_b].':'.$result->title_b ,'');
}
function pages2xml( $pages, $curonly = false ) {
- global $wgLanguageCode, $wgInputEncoding, $wgLang;
+ global $wgContLanguageCode, $wgInputEncoding, $wgContLang;
$xml = "<" . "?xml version=\"1.0\" encoding=\"UTF-8\" ?" . ">\n" .
- "<mediawiki version=\"0.1\" xml:lang=\"$wgLanguageCode\">\n";
+ "<mediawiki version=\"0.1\" xml:lang=\"$wgContLanguageCode\">\n";
foreach( $pages as $page ) {
$xml .= page2xml( $page, $curonly );
}
$xml .= "</mediawiki>\n";
if($wgInputEncoding != "utf-8")
- $xml = $wgLang->iconv( $wgInputEncoding, "utf-8", $xml );
+ $xml = $wgContLang->iconv( $wgInputEncoding, "utf-8", $xml );
return $xml;
}
*
*/
function wfSpecialImagelist() {
- global $wgUser, $wgOut, $wgLang, $wgRequest;
+ global $wgUser, $wgOut, $wgLang, $wgContLang, $wgRequest;
$sort = $wgRequest->getVal( 'sort' );
$wpIlMatch = $wgRequest->getText( 'wpIlMatch' );
htmlspecialchars( $wpIlMatch ) . "\" /> " .
"<input type='submit' name=\"wpIlSubmit\" value=\"{$sub}\" /></form>" );
$nums = array( 50, 100, 250, 500 );
- $here = $wgLang->specialPage( "Imagelist" );
+ $here = $wgContLang->specialPage( "Imagelist" );
$fill = "";
$first = true;
$name = $s->img_name;
$ut = $s->img_user_text;
if ( 0 == $s->img_user ) { $ul = $ut; }
- else { $ul = $sk->makeLink( $wgLang->getNsText(
+ else { $ul = $sk->makeLink( $wgContLang->getNsText(
Namespace::getUser() ) . ":{$ut}", $ut ); }
$ilink = "<a href=\"" . Image::wfImageUrl( $name ) .
$nb = wfMsg( "nbytes", $wgLang->formatNum( $s->img_size ) );
$l = "(" .
- $sk->makeKnownLink( $wgLang->getNsText(
+ $sk->makeKnownLink( $wgContLang->getNsText(
Namespace::getImage() ) . ":{$name}", wfMsg( "imgdesc" ) ) .
") {$ilink} . . {$nb} . . {$ul} . . " .
$wgLang->timeanddate( $s->img_timestamp, true );
}
function fixEncoding( $data ) {
- global $wgLang, $wgInputEncoding;
+ global $wgContLang, $wgInputEncoding;
if( strcasecmp( $wgInputEncoding, "utf-8" ) == 0 ) {
return $data;
} else {
- return $wgLang->iconv( "utf-8", $wgInputEncoding, $data );
+ return $wgContLang->iconv( "utf-8", $wgInputEncoding, $data );
}
}
* Callback function to output a block
*/
function wfAddRow( $block, $tag ) {
- global $wgOut, $wgUser, $wgLang;
+ global $wgOut, $wgUser, $wgLang, $wgContLang;
$sk = $wgUser->getSkin();
$addr = $block->mAuto ? "#{$block->mId}" : $block->mAddress;
$name = User::whoIs( $block->mBy );
- $ulink = $sk->makeKnownLink( $wgLang->getNsText( Namespace::getUser() ). ":{$name}", $name );
+ $ulink = $sk->makeKnownLink( $wgContLang->getNsText( Namespace::getUser() ). ":{$name}", $name );
$formattedTime = $wgLang->timeanddate( $block->mTimestamp, true );
if ( $block->mExpiry === "" ) {
}
function formatResult( $skin, $result ) {
- global $wgLang;
- $name = $skin->makeLink( $wgLang->getNsText($result->namespace) . ':' . $result->title, $result->title );
+ global $wgContLang;
+ $name = $skin->makeLink( $wgContLang->getNsText($result->namespace) . ':' . $result->title, $result->title );
if( '' != $result->type ) {
$name .= ' (' .
$skin->makeLink( wfMsg( "administrators" ), $result->type) .
* @private
*/
function showPrevNext( &$out ) {
- global $wgLang;
+ global $wgContLang;
$pieces = array();
$pieces[] = 'type=' . htmlspecialchars( $this->reader->queryType() );
$pieces[] = 'user=' . htmlspecialchars( $this->reader->queryUser() );
# TODO: use timestamps instead of offsets to make it more natural
# to go huge distances in time
$html = wfViewPrevNext( $offset, $limit,
- $wgLang->specialpage( 'Log' ),
+ $wgContLang->specialpage( 'Log' ),
$bits,
false);
$out->addHTML( '<p>' . $html . '</p>' );
* shortcut to get the current language "special" namespace name
*/
function sns() {
- global $wgLang ;
- $ns = $wgLang->getNamespaces() ;
+ global $wgContLang ;
+ $ns = $wgContLang->getNamespaces() ;
return $ns[NS_SPECIAL] ;
}
* 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
if ( !is_null( $submitmll ) ) return wfSpecialMissingLanguageLinks() ;
$sk = $wgUser->getSkin();
- $ns = $wgLang->getNamespaces() ;
+ $ns = $wgContLang->getNamespaces() ;
# Generate page output
$r .= "\">\n" ;
$r .= "<select name=\"thelang\">\n" ;
- $a = $wgLang->getLanguageNames();
+ $a = $wgContLang->getLanguageNames();
$ak = array_keys ( $a ) ;
foreach ( $ak AS $k ) {
- if ( $k != $wgLanguageCode )
+ if ( $k != $wgContLanguageCode )
$r .= "<option value='{$k}'>{$a[$k]}</option>\n" ;
}
$r .= "</select>\n" ;
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' ) ) ;
*
*/
function wfSpecialMispeelings () {
- global $wgUser, $wgOut, $wgLang, $wgTitle;
+ global $wgUser, $wgOut, $wgContLang, $wgTitle;
$sk = $wgUser->getSkin();
$fname = '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
$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 ) {
*
*/
function wfSpecialMissingLanguageLinks() {
- global $wgUser, $wgOut, $wgLang, $wgTitle, $wgRequest;
+ global $wgUser, $wgOut, $wgContLang, $wgTitle, $wgRequest;
$fname = 'wfSpecialMissingLanguageLinks';
$thelang = $wgRequest->getText( 'thelang' );
$res = $dbr->query( $sql, $fname );
- $mll = wfMsg( 'missinglanguagelinkstext', $wgLang->getLanguageName($thelang) );
+ $mll = wfMsg( 'missinglanguagelinkstext', $wgContLang->getLanguageName($thelang) );
$top = getMaintenancePageBacklink( 'missinglanguagelinks' );
$top .= "<p>$mll</p><br>";
*
*/
function wfSpecialNewimages() {
- global $wgUser, $wgOut, $wgLang, $wgRequest;
+ global $wgUser, $wgOut, $wgLang, $wgContLang, $wgRequest;
$sort = $wgRequest->getVal( 'sort' );
$wpIlMatch = $wgRequest->getText( 'wpIlMatch' );
htmlspecialchars( $wpIlMatch ) . "\" /> " .
"<input type='submit' name=\"wpIlSubmit\" value=\"{$sub}\" /></form>" );
$nums = array( 50, 100, 250, 500 );
- $here = $wgLang->specialPage( "Imagelist" );
+ $here = $wgContLang->specialPage( "Imagelist" );
$fill = "";
$first = true;
$nt = Title::newFromText( $name, NS_IMAGE );
$img = Image::newFromTitle( $nt );
- $ul = $sk->makeLink( $wgLang->getNsText( Namespace::getUser() ) . ":{$ut}", $ut );
+ $ul = $sk->makeLink( $wgContLang->getNsText( Namespace::getUser() ) . ":{$ut}", $ut );
$gallery->add( $img, $ul.'<br /><i>'.$wgLang->timeanddate( $s->img_timestamp, true ).'</i><br />' );
$i++;
}
function formatResult( $skin, $result ) {
- global $wgLang, $wgUser, $wgOnlySysopsCanPatrol, $wgUseRCPatrol;
+ global $wgLang, $wgContLang, $wgUser, $wgOnlySysopsCanPatrol, $wgUseRCPatrol;
$u = $result->user;
$ut = $result->user_text;
$ul = $ut;
}
else {
- $ul = $skin->makeLink( $wgLang->getNsText(NS_USER) . ":{$ut}", $ut );
+ $ul = $skin->makeLink( $wgContLang->getNsText(NS_USER) . ":{$ut}", $ut );
}
$d = $wgLang->timeanddate( $result->timestamp, true );
* Load some values
*/
function PreferencesForm( &$request ) {
- global $wgLang, $wgAllowRealName;
+ global $wgLang, $wgContLang, $wgAllowRealName;
$this->mQuickbar = $request->getVal( 'wpQuickbar' );
$this->mOldpass = $request->getVal( 'wpOldpass' );
# Note: namespaces don't necessarily have consecutive keys
$this->mSearchNs = array();
if ( $this->mPosted ) {
- $namespaces = $wgLang->getNamespaces();
+ $namespaces = $wgContLang->getNamespaces();
foreach ( $namespaces as $i => $namespace ) {
if ( $i >= 0 ) {
$this->mSearchNs[$i] = $request->getCheck( "wpNs$i" ) ? 1 : 0;
* @access private
*/
function resetPrefs() {
- global $wgUser, $wgLang, $wgAllowRealName;
+ global $wgUser, $wgLang, $wgContLang, $wgAllowRealName;
$this->mOldpass = $this->mNewpass = $this->mRetypePass = '';
$this->mUserEmail = $wgUser->getEmail();
$this->mToggles[$tname] = $wgUser->getOption( $tname );
}
- $namespaces = $wgLang->getNamespaces();
+ $namespaces = $wgContLang->getNamespaces();
foreach ( $namespaces as $i => $namespace ) {
if ( $i >= 0 ) {
$this->mSearchNs[$i] = $wgUser->getOption( 'searchNs'.$i );
* @access private
*/
function namespacesCheckboxes() {
- global $wgLang, $wgUser;
+ global $wgContLang, $wgUser;
# Determine namespace checkboxes
- $namespaces = $wgLang->getNamespaces();
+ $namespaces = $wgContLang->getNamespaces();
$r1 = '';
foreach ( $namespaces as $i => $name ) {