$from = $skin->makeKnownLinkObj( $fromObj ,'', 'redirect=no' );
$edit = $skin->makeBrokenLinkObj( $fromObj , "(".wfMsg("qbedit").")" , 'redirect=no');
$to = $skin->makeBrokenLinkObj( $toObj );
- $arr = $wgContLang->isRTL() ? '←' : '→';
+ $arr = $wgContLang->getArrow();
return "$from $edit $arr $to";
}
global $wgUser;
$sk = $wgUser->getSkin();
- #FIXME : probably need to add a backlink to the maintenance page.
return '<p>'.wfMsg('disambiguationstext', $sk->makeKnownLink(wfMsgForContent('disambiguationspage')) )."</p><br />\n";
}
}
function formatResult( $skin, $result ) {
+ global $wgContLang;
$title = Title::newFromId( $result->value );
$dp = Title::makeTitle( $result->namespace, $result->title );
$from = $skin->makeKnownLinkObj( $title,'');
$edit = $skin->makeBrokenLinkObj( $title, "(".wfMsg("qbedit").")" , 'redirect=no');
+ $arr = $wgContLang->getArrow();
$to = $skin->makeKnownLinkObj( $dp,'');
- return "$from $edit => $to";
+ return "$from $edit $arr $to";
}
}
$edit = $skin->makeBrokenLinkObj( $titleA, "(".wfMsg("qbedit").")" , 'redirect=no');
$linkB = $skin->makeKnownLinkObj( $titleB, '', 'redirect=no' );
$linkC = $skin->makeKnownLinkObj( $titleC );
- $arr = $wgContLang->isRTL() ? '←' : '→';
+ $arr = $wgContLang->getArrow() . $wgContLang->getDirMark();
return( "{$linkA} {$edit} {$arr} {$linkB} {$arr} {$linkC}" );
}
# Make a link to the redirect itself
$rd_title = Title::makeTitle( $result->namespace, $result->title );
+ $arr = $wgContLang->getArrow() . $wgContLang->getDirMark();
$rd_link = $skin->makeKnownLinkObj( $rd_title, '', 'redirect=no' );
# Find out where the redirect leads
$targetLink = '*';
}
- # Check the language; RTL wikis need a ←
- $arr = $wgContLang->isRTL() ? ' ← ' : ' → ';
- $arr .= $wgContLang->getDirMark();
-
# Format the whole thing and return it
return( $rd_link . $arr . $targetLink );
*
* @return string
*/
- function getDirMark() { return $this->isRTL() ? "\xE2\x80\x8F" : "\xE2\x80\x8E"; }
+ function getDirMark() {
+ return $this->isRTL() ? "\xE2\x80\x8F" : "\xE2\x80\x8E";
+ }
+
+ /**
+ * An arrow, depending on the language direction
+ *
+ * @return string
+ */
+ function getArrow() {
+ return $this->isRTL() ? '←' : '→';
+ }
/**
* To allow "foo[[bar]]" to extend the link over the whole word "foobar"
*
* @return bool
*/
- function linkPrefixExtension() {
+ function linkPrefixExtension() {
$this->load();
- return $this->linkPrefixExtension;
+ return $this->linkPrefixExtension;
}
function &getMagicWords() {