$titles = array( $user->getUserPage(), $user->getTalkPage() );
// Other tab link
- if ( $this->getTitle()->getNamespace() == NS_SPECIAL ) {
+ if ( $this->getTitle()->isSpecialPage() ) {
// nothing
} elseif ( $this->getTitle()->isTalkPage() ) {
$titles[] = $this->getTitle()->getSubjectPage();
$this->mRelevantUser = User::newFromName( $rootUser, false );
} else {
$user = User::newFromName( $rootUser, false );
- if ( $user->isLoggedIn() ) {
+ if ( $user && $user->isLoggedIn() ) {
$this->mRelevantUser = $user;
}
}
function getPageClasses( $title ) {
$numeric = 'ns-' . $title->getNamespace();
- if ( $title->getNamespace() == NS_SPECIAL ) {
+ if ( $title->isSpecialPage() ) {
$type = 'ns-special';
// bug 23315: provide a class based on the canonical special page name without subpages
list( $canonicalName ) = SpecialPageFactory::resolveAlias( $title->getDBkey() );
$msgObj = $this->msg( $msg )->rawParams( $link );
if ( $forContent ) {
$msg = $msgObj->inContentLanguage()->text();
- if ( $this->getLang()->getCode() !== $wgContLang->getCode() ) {
+ if ( $this->getLanguage()->getCode() !== $wgContLang->getCode() ) {
$msg = Html::rawElement( 'span', array( 'lang' => $wgContLang->getCode(), 'dir' => $wgContLang->getDir() ), $msg );
}
return $msg;
global $wgStylePath;
$url = htmlspecialchars( "$wgStylePath/common/images/poweredby_mediawiki_88x31.png" );
- $text = '<a href="http://www.mediawiki.org/"><img src="' . $url . '" height="31" width="88" alt="Powered by MediaWiki" /></a>';
+ $text = '<a href="//www.mediawiki.org/"><img src="' . $url . '" height="31" width="88" alt="Powered by MediaWiki" /></a>';
wfRunHooks( 'SkinGetPoweredBy', array( &$text, $this ) );
return $text;
}
/**
* Get the timestamp of the latest revision, formatted in user language
*
- * @param $article Article object. Used if we're working with the current revision
+ * @param $page WikiPage object. Used if we're working with the current revision
* @return String
*/
- protected function lastModified( $article ) {
+ protected function lastModified( $page ) {
if ( !$this->isRevisionCurrent() ) {
$timestamp = Revision::getTimestampFromId( $this->getTitle(), $this->getRevisionId() );
} else {
- $timestamp = $article->getTimestamp();
+ $timestamp = $page->getTimestamp();
}
if ( $timestamp ) {
- $d = $this->getLang()->userDate( $timestamp, $this->getUser() );
- $t = $this->getLang()->userTime( $timestamp, $this->getUser() );
+ $d = $this->getLanguage()->userDate( $timestamp, $this->getUser() );
+ $t = $this->getLanguage()->userTime( $timestamp, $this->getUser() );
$s = ' ' . $this->msg( 'lastmodifiedat', $d, $t )->text();
} else {
$s = '';
global $parserMemc, $wgEnableSidebarCache, $wgSidebarCacheExpiry;
wfProfileIn( __METHOD__ );
- $key = wfMemcKey( 'sidebar', $this->getLang()->getCode() );
+ $key = wfMemcKey( 'sidebar', $this->getLanguage()->getCode() );
if ( $wgEnableSidebarCache ) {
$cachedsidebar = $parserMemc->get( $key );