* Improvements as part of bug 6100: Use wfUILang() instead of $wgContLang where appropriate
* Remove $wgContLang in SpecialVersion per r90302
This commit is contained in:
parent
b05ae5eacf
commit
15f3df018f
12 changed files with 18 additions and 25 deletions
|
|
@ -2522,8 +2522,7 @@ function in_string( $needle, $str, $insensitive = false ) {
|
|||
}
|
||||
|
||||
function wfSpecialList( $page, $details ) {
|
||||
global $wgContLang;
|
||||
$details = $details ? ' ' . $wgContLang->getDirMark() . "($details)" : '';
|
||||
$details = $details ? ' ' . wfUILang()->getDirMark() . "($details)" : '';
|
||||
return $page . $details;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -364,12 +364,11 @@ class LogEventsList {
|
|||
}
|
||||
|
||||
private function logComment( $row ) {
|
||||
global $wgContLang;
|
||||
if( self::isDeleted( $row, LogPage::DELETED_COMMENT ) ) {
|
||||
$comment = '<span class="history-deleted">' .
|
||||
wfMsgHtml( 'rev-deleted-comment' ) . '</span>';
|
||||
} else {
|
||||
$comment = $wgContLang->getDirMark() .
|
||||
$comment = wfUILang()->getDirMark() .
|
||||
$this->skin->commentBlock( $row->log_comment );
|
||||
}
|
||||
return $comment;
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ class BrokenRedirectsPage extends PageQueryPage {
|
|||
* @return String
|
||||
*/
|
||||
function formatResult( $skin, $result ) {
|
||||
global $wgUser, $wgContLang, $wgLang;
|
||||
global $wgUser, $wgLang;
|
||||
|
||||
$fromObj = Title::makeTitle( $result->namespace, $result->title );
|
||||
if ( isset( $result->rd_title ) ) {
|
||||
|
|
@ -116,7 +116,7 @@ class BrokenRedirectsPage extends PageQueryPage {
|
|||
array(),
|
||||
array( 'broken' )
|
||||
);
|
||||
$arr = $wgContLang->getArrow();
|
||||
$arr = wfUILang()->getArrow();
|
||||
|
||||
$out = $from . wfMsg( 'word-separator' );
|
||||
|
||||
|
|
|
|||
|
|
@ -543,7 +543,7 @@ class ContribsPager extends ReverseChronologicalPager {
|
|||
* @todo This would probably look a lot nicer in a table.
|
||||
*/
|
||||
function formatRow( $row ) {
|
||||
global $wgUser, $wgLang, $wgContLang;
|
||||
global $wgUser, $wgLang;
|
||||
wfProfileIn( __METHOD__ );
|
||||
|
||||
$sk = $this->getSkin();
|
||||
|
|
@ -590,7 +590,7 @@ class ContribsPager extends ReverseChronologicalPager {
|
|||
array( 'action' => 'history' )
|
||||
);
|
||||
|
||||
$comment = $wgContLang->getDirMark() . $sk->revComment( $rev, false, true );
|
||||
$comment = wfUILang()->getDirMark() . $sk->revComment( $rev, false, true );
|
||||
$date = $wgLang->timeanddate( wfTimestamp( TS_MW, $row->rev_timestamp ), true );
|
||||
if( $rev->userCan( Revision::DELETED_TEXT ) ) {
|
||||
$d = $sk->linkKnown(
|
||||
|
|
|
|||
|
|
@ -122,14 +122,13 @@ class DisambiguationsPage extends PageQueryPage {
|
|||
}
|
||||
|
||||
function formatResult( $skin, $result ) {
|
||||
global $wgContLang;
|
||||
$title = Title::newFromID( $result->value );
|
||||
$dp = Title::makeTitle( $result->namespace, $result->title );
|
||||
|
||||
$from = $skin->link( $title );
|
||||
$edit = $skin->link( $title, wfMsgExt( 'parentheses', array( 'escape' ), wfMsg( 'editlink' ) ) ,
|
||||
array(), array( 'redirect' => 'no', 'action' => 'edit' ) );
|
||||
$arr = $wgContLang->getArrow();
|
||||
$arr = wfUILang()->getArrow();
|
||||
$to = $skin->link( $dp );
|
||||
|
||||
return "$from $edit $arr $to";
|
||||
|
|
|
|||
|
|
@ -76,8 +76,6 @@ class DoubleRedirectsPage extends PageQueryPage {
|
|||
}
|
||||
|
||||
function formatResult( $skin, $result ) {
|
||||
global $wgContLang;
|
||||
|
||||
$titleA = Title::makeTitle( $result->namespace, $result->title );
|
||||
|
||||
if ( $result && !isset( $result->nsb ) ) {
|
||||
|
|
@ -119,7 +117,7 @@ class DoubleRedirectsPage extends PageQueryPage {
|
|||
array( 'redirect' => 'no' )
|
||||
);
|
||||
$linkC = $skin->linkKnown( $titleC );
|
||||
$arr = $wgContLang->getArrow() . $wgContLang->getDirMark();
|
||||
$arr = wfUILang()->getArrow() . wfUILang()->getDirMark();
|
||||
|
||||
return( "{$linkA} {$edit} {$arr} {$linkB} {$arr} {$linkC}" );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ class FileDuplicateSearchPage extends QueryPage {
|
|||
}
|
||||
|
||||
function execute( $par ) {
|
||||
global $wgRequest, $wgOut, $wgLang, $wgContLang, $wgScript;
|
||||
global $wgRequest, $wgOut, $wgLang, $wgScript;
|
||||
|
||||
$this->setHeaders();
|
||||
$this->outputHeader();
|
||||
|
|
@ -126,7 +126,7 @@ class FileDuplicateSearchPage extends QueryPage {
|
|||
}
|
||||
|
||||
if( $this->hash != '' ) {
|
||||
$align = $wgContLang->alignEnd();
|
||||
$align = wfUILang()->alignEnd();
|
||||
|
||||
# Show a thumbnail of the file
|
||||
$img = $this->file;
|
||||
|
|
|
|||
|
|
@ -96,8 +96,6 @@ class ListredirectsPage extends QueryPage {
|
|||
}
|
||||
|
||||
function formatResult( $skin, $result ) {
|
||||
global $wgContLang;
|
||||
|
||||
# Make a link to the redirect itself
|
||||
$rd_title = Title::makeTitle( $result->namespace, $result->title );
|
||||
$rd_link = $skin->link(
|
||||
|
|
@ -111,7 +109,7 @@ class ListredirectsPage extends QueryPage {
|
|||
$target = $this->getRedirectTarget( $result );
|
||||
if( $target ) {
|
||||
# Make a link to the destination page
|
||||
$arr = $wgContLang->getArrow() . $wgContLang->getDirMark();
|
||||
$arr = wfUILang()->getArrow() . wfUILang()->getDirMark();
|
||||
$targetLink = $skin->link( $target );
|
||||
return "$rd_link $arr $targetLink";
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ class SpecialNewpages extends IncludableSpecialPage {
|
|||
* @return String
|
||||
*/
|
||||
public function formatRow( $result ) {
|
||||
global $wgLang, $wgContLang;
|
||||
global $wgLang;
|
||||
|
||||
# Revision deletion works on revisions, so we should cast one
|
||||
$row = array(
|
||||
|
|
@ -302,7 +302,7 @@ class SpecialNewpages extends IncludableSpecialPage {
|
|||
|
||||
$classes = array();
|
||||
|
||||
$dm = $wgContLang->getDirMark();
|
||||
$dm = wfUILang()->getDirMark();
|
||||
|
||||
$title = Title::makeTitleSafe( $result->rc_namespace, $result->rc_title );
|
||||
$time = Html::element( 'span', array( 'class' => 'mw-newpages-time' ),
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ class SpecialProtectedpages extends SpecialPage {
|
|||
* @return string Formatted <li> element
|
||||
*/
|
||||
public function formatRow( $row ) {
|
||||
global $wgUser, $wgLang, $wgContLang;
|
||||
global $wgUser, $wgLang;
|
||||
|
||||
wfProfileIn( __METHOD__ );
|
||||
|
||||
|
|
@ -116,7 +116,7 @@ class SpecialProtectedpages extends SpecialPage {
|
|||
}
|
||||
|
||||
if(!is_null($size = $row->page_len)) {
|
||||
$stxt = $wgContLang->getDirMark() . ' ' . $skin->formatRevisionSize( $size );
|
||||
$stxt = wfUILang()->getDirMark() . ' ' . $skin->formatRevisionSize( $size );
|
||||
}
|
||||
|
||||
# Show a link to the change protection form for allowed users otherwise a link to the protection log
|
||||
|
|
|
|||
|
|
@ -86,8 +86,8 @@ class ShortPagesPage extends QueryPage {
|
|||
}
|
||||
|
||||
function formatResult( $skin, $result ) {
|
||||
global $wgLang, $wgContLang;
|
||||
$dm = $wgContLang->getDirMark();
|
||||
global $wgLang;
|
||||
$dm = wfUILang()->getDirMark();
|
||||
|
||||
$title = Title::makeTitle( $result->namespace, $result->title );
|
||||
if ( !$title ) {
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class SpecialVersion extends SpecialPage {
|
|||
* main()
|
||||
*/
|
||||
public function execute( $par ) {
|
||||
global $wgOut, $wgSpecialVersionShowHooks, $wgContLang, $wgRequest;
|
||||
global $wgOut, $wgSpecialVersionShowHooks, $wgRequest;
|
||||
|
||||
$this->setHeaders();
|
||||
$this->outputHeader();
|
||||
|
|
|
|||
Loading…
Reference in a new issue