* (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 ==
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
*
$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);
}
}
$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);
}
}
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 );
$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);
}
}
$nl = wfMsg( 'ncategories', $result->value );
$nlink = $skin->makeKnownLink( $wgContLang->specialPage( 'Categories' ), $nl, 'article=' . $nt->getPrefixedURL() );
- return "{$plink} ({$nlink})";
+ return wfSpecialList($plink, $nlink);
}
}
$nl = wfMsg( 'nlinks', $result->value );
$nlink = $skin->makeKnownLink( $nt->getPrefixedText() . '#filelinks', $nl );
- return "$plink ($nlink)";
+ return wfSpecialList($plink, $nlink);
}
}
$nl = wfMsg( 'nlinks', $result->value );
$nlink = $skin->makeKnownLink( $wgContLang->specialPage( 'Whatlinkshere' ), $nl, 'target=' . $nt->getPrefixedURL() );
- return "{$plink} ({$nlink})";
+ return wfSpecialList($plink, $nlink);
}
}
$plink = $skin->makeLinkObj( $nt, htmlspecialchars( $text ) );
$nlinks = wfMsg( 'nlinks', $result->value );
- return "$plink ($nlinks)";
+ return wfSpecialList($plink, $nlinks);
}
}
$nl = wfMsg( 'nrevisions', $result->value );
$nlink = $skin->makeKnownLinkObj( $nt, $nl, 'action=history' );
- return "$plink ($nlink)";
+ return wfSpecialList($plink, $nlink);
}
}
$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);
}
}
$skin->makeBrokenLinkObj( $nt, htmlspecialchars( $text ) );
$nlinks = wfMsg( 'nlinks', $result->value );
- return "$plink ($nlinks)";
+ return wfSpecialList($plink, $nlinks);
}
}
# 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);
}
/**
* @return bool
*/
function isRTL() { return false; }
+ function getDirMark() { return $this->isRTL() ? '‏' : '‎'; }
/**
* To allow "foo[[bar]]" to extend the link over the whole word "foobar"