wfProfileIn( __METHOD__ . '-checkPageExistence' );
if( !in_array( 'known', $options ) and !in_array( 'broken', $options ) ) {
if( $target->getNamespace() == NS_SPECIAL ) {
- if( SpecialPage::exists( $target->getDbKey() ) ) {
+ if( SpecialPage::exists( $target->getDBKey() ) ) {
$options []= 'known';
} else {
$options []= 'broken';
}
$ret = null;
- if( wfRunHooks( 'LinkEnd', array( $this, $target, $options, &$text,
- &$attribs, &$ret ) ) ) {
- $ret = Xml::openElement( 'a', $attribs )
- . $text
- . Xml::closeElement( 'a' );
+ if( wfRunHooks( 'LinkEnd', array( $this, $target, $options, &$text, &$attribs, &$ret ) ) ) {
+ $ret = Xml::openElement( 'a', $attribs ) . $text . Xml::closeElement( 'a' );
}
wfProfileOut( __METHOD__ );
} else {
if ( isset( $fp['manualthumb'] ) ) {
# Use manually specified thumbnail
- $manual_title = Title::makeTitleSafe( NS_IMAGE, $fp['manualthumb'] );
+ $manual_title = Title::makeTitleSafe( NS_FILE, $fp['manualthumb'] );
if( $manual_title ) {
$manual_img = wfFindFile( $manual_title );
if ( $manual_img ) {
/** @deprecated use Linker::makeMediaLinkObj() */
function makeMediaLink( $name, $unused = '', $text = '', $time = false ) {
- $nt = Title::makeTitleSafe( NS_IMAGE, $name );
+ $nt = Title::makeTitleSafe( NS_FILE, $name );
return $this->makeMediaLinkObj( $nt, $text, $time );
}
} else {
$page = Title::makeTitle( NS_USER, $userText );
}
- return $this->link( $page, htmlspecialchars( $userText ) );
+ return $this->link( $page, htmlspecialchars( $userText ), array( 'class' => 'mw-userlink' ) );
}
/**
}
if( $items ) {
- return ' (' . implode( ' | ', $items ) . ')';
+ return ' <span class="mw-usertoollinks">(' . implode( ' | ', $items ) . ')</span>';
} else {
return '';
}
* escape), or false for no accesskey attribute
*/
public function accesskey( $name ) {
+ wfProfileIn( __METHOD__ );
+
$accesskey = wfMsg( "accesskey-$name" );
# FIXME: Per standard MW behavior, a value of '-' means to suppress the
if( $accesskey != ''
&& $accesskey != '-'
&& !wfEmptyMsg( "accesskey-$name", $accesskey ) ) {
+ wfProfileOut( __METHOD__ );
return $accesskey;
}
+
+ wfProfileOut( __METHOD__ );
return false;
}
}