Title $title, $text, $wikiId = null, $options = []
) {
if ( $wikiId !== null && !$title->isExternal() ) {
- $link = Linker::makeExternalLink(
+ $link = self::makeExternalLink(
WikiMap::getForeignURL(
$wikiId,
- $title->getPrefixedText(),
+ $title->getNamespace() === 0
+ ? $title->getDBkey()
+ : MWNamespace::getCanonicalName( $title->getNamespace() ) . ':'
+ . $title->getDBkey(),
$title->getFragment()
),
$text,
/* escape = */ false // Already escaped
);
} else {
- $link = Linker::link( $title, $text, [], [], $options );
+ $link = self::link( $title, $text, [], [], $options );
}
return $link;
* @return string HTML output
*/
public static function formatHiddenCategories( $hiddencats ) {
-
$outText = '';
if ( count( $hiddencats ) > 0 ) {
# Construct the HTML
}
if ( !$rev->userCan( Revision::DELETED_RESTRICTED, $user ) ) {
- return Linker::revDeleteLinkDisabled( $canHide ); // revision was hidden from sysops
+ return self::revDeleteLinkDisabled( $canHide ); // revision was hidden from sysops
} else {
if ( $rev->getId() ) {
// RevDelete links using revision ID are stable across
'ids' => $rev->getTimestamp()
];
}
- return Linker::revDeleteLink( $query,
+ return self::revDeleteLink( $query,
$rev->isDeleted( Revision::DELETED_RESTRICTED ), $canHide );
}
}
* @return array
*/
public static function tooltipAndAccesskeyAttribs( $name, array $msgParams = [] ) {
- # @todo FIXME: If Sanitizer::expandAttributes() treated "false" as "output
- # no attribute" instead of "output '' as value for attribute", this
- # would be three lines.
$attribs = [
'title' => self::titleAttrib( $name, 'withaccess', $msgParams ),
'accesskey' => self::accesskey( $name )
* @return null|string
*/
public static function tooltip( $name, $options = null ) {
- # @todo FIXME: If Sanitizer::expandAttributes() treated "false" as "output
- # no attribute" instead of "output '' as value for attribute", this
- # would be two lines.
$tooltip = self::titleAttrib( $name, $options );
if ( $tooltip === false ) {
return '';