* Bidi-aid on list pages
* Some lists with bidi titles should be more readable now
This commit is contained in:
parent
5b946d32df
commit
6136b2fee4
14 changed files with 23 additions and 16 deletions
|
|
@ -182,6 +182,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
|
|||
* (bug 361) URL in URL, they were almost fixed. Now they are.
|
||||
* (bug 4876) Add __NEWSECTIONLINK__ magic word to force the "new section" link/tab to
|
||||
show up on specific pages on demand
|
||||
* Bidi-aid on list pages
|
||||
|
||||
== Compatibility ==
|
||||
|
||||
|
|
|
|||
|
|
@ -1621,6 +1621,12 @@ function in_string( $needle, $str ) {
|
|||
return strpos( $str, $needle ) !== false;
|
||||
}
|
||||
|
||||
function wfSpecialList( $page, $details ) {
|
||||
global $wgContLang;
|
||||
$details = $details ? $wgContLang->getDirMark() . " ($details)" : "";
|
||||
return $page . $details;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a regular expression of url protocols
|
||||
*
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class AncientPagesPage extends QueryPage {
|
|||
$d = $wgLang->timeanddate( wfTimestamp( TS_MW, $result->value ), true );
|
||||
$title = Title::makeTitle( $result->namespace, $result->title );
|
||||
$link = $skin->makeKnownLinkObj( $title, htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) );
|
||||
return "{$link} ({$d})";
|
||||
return wfSpecialList($link, $d);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class CategoriesPage extends QueryPage {
|
|||
$title = Title::makeTitle( NS_CATEGORY, $result->title );
|
||||
$plink = $skin->makeLinkObj( $title, $title->getText() );
|
||||
$nlinks = wfMsg( 'nlinks', $result->count );
|
||||
return "$plink ($nlinks)";
|
||||
return wfSpecialList($plink, $nlinks);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -176,6 +176,7 @@ class ListUsersPage extends QueryPage {
|
|||
function formatResult( $skin, $result ) {
|
||||
$userPage = Title::makeTitle( $result->namespace, $result->title );
|
||||
$name = $skin->makeLinkObj( $userPage, htmlspecialchars( $userPage->getText() ) );
|
||||
$groups = null;
|
||||
|
||||
if( !isset( $result->numgroups ) || $result->numgroups > 0 ) {
|
||||
$dbr =& wfGetDB( DB_SLAVE );
|
||||
|
|
@ -190,14 +191,12 @@ class ListUsersPage extends QueryPage {
|
|||
$dbr->freeResult( $result );
|
||||
|
||||
if( count( $groups ) > 0 ) {
|
||||
$name .= ' (' .
|
||||
$skin->makeLink( wfMsgForContent( 'administrators' ),
|
||||
htmlspecialchars( implode( ', ', $groups ) ) ) .
|
||||
')';
|
||||
$groups = $skin->makeLink( wfMsgForContent( 'administrators' ),
|
||||
htmlspecialchars( implode( ', ', $groups ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
return $name;
|
||||
return wfSpecialList($name, $groups);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ class MostcategoriesPage extends QueryPage {
|
|||
$nl = wfMsg( 'ncategories', $result->value );
|
||||
$nlink = $skin->makeKnownLink( $wgContLang->specialPage( 'Categories' ), $nl, 'article=' . $nt->getPrefixedURL() );
|
||||
|
||||
return "{$plink} ({$nlink})";
|
||||
return wfSpecialList($plink, $nlink);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class MostimagesPage extends QueryPage {
|
|||
$nl = wfMsg( 'nlinks', $result->value );
|
||||
$nlink = $skin->makeKnownLink( $nt->getPrefixedText() . '#filelinks', $nl );
|
||||
|
||||
return "$plink ($nlink)";
|
||||
return wfSpecialList($plink, $nlink);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class MostlinkedPage extends QueryPage {
|
|||
$nl = wfMsg( 'nlinks', $result->value );
|
||||
$nlink = $skin->makeKnownLink( $wgContLang->specialPage( 'Whatlinkshere' ), $nl, 'target=' . $nt->getPrefixedURL() );
|
||||
|
||||
return "{$plink} ({$nlink})";
|
||||
return wfSpecialList($plink, $nlink);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ class MostlinkedCategoriesPage extends QueryPage {
|
|||
$plink = $skin->makeLinkObj( $nt, htmlspecialchars( $text ) );
|
||||
|
||||
$nlinks = wfMsg( 'nlinks', $result->value );
|
||||
return "$plink ($nlinks)";
|
||||
return wfSpecialList($plink, $nlinks);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class MostrevisionsPage extends QueryPage {
|
|||
$nl = wfMsg( 'nrevisions', $result->value );
|
||||
$nlink = $skin->makeKnownLinkObj( $nt, $nl, 'action=history' );
|
||||
|
||||
return "$plink ($nlink)";
|
||||
return wfSpecialList($plink, $nlink);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class PopularPagesPage extends QueryPage {
|
|||
$title = Title::makeTitle( $result->namespace, $result->title );
|
||||
$link = $skin->makeKnownLinkObj( $title, htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) );
|
||||
$nv = wfMsg( "nviews", $wgLang->formatNum( $result->value ) );
|
||||
return "{$link} ({$nv})";
|
||||
return wfSpecialList($link, $nv);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class WantedCategoriesPage extends QueryPage {
|
|||
$skin->makeBrokenLinkObj( $nt, htmlspecialchars( $text ) );
|
||||
|
||||
$nlinks = wfMsg( 'nlinks', $result->value );
|
||||
return "$plink ($nlinks)";
|
||||
return wfSpecialList($plink, $nlinks);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,10 +91,10 @@ class WantedPagesPage extends QueryPage {
|
|||
|
||||
# Make a link to "what links here" if it's required
|
||||
$wlhLink = $this->nlinks
|
||||
? " (" . $this->makeWlhLink( $title, $skin, wfMsgHtml( 'nlinks', $result->value ) ) . ")"
|
||||
? $this->makeWlhLink( $title, $skin, wfMsgHtml( 'nlinks', $result->value ) )
|
||||
: "";
|
||||
|
||||
return "{$pageLink}{$wlhLink}";
|
||||
return wfSpecialList($pageLink, $wlhLink);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -861,6 +861,7 @@ class Language {
|
|||
* @return bool
|
||||
*/
|
||||
function isRTL() { return false; }
|
||||
function getDirMark() { return $this->isRTL() ? '‏' : '‎'; }
|
||||
|
||||
/**
|
||||
* To allow "foo[[bar]]" to extend the link over the whole word "foobar"
|
||||
|
|
|
|||
Loading…
Reference in a new issue