* {{REVISIONTIMESTAMP}} now uses site local timezone instead of user timezone
to ensure consistent behavior
* {{REVISIONTIMESTAMP}} and friends should now work on non-MySQL backends
-
+* Special:Contributions has been rewritten to inherit from QueryPage
+* Special:Contributions/newbies now lists the user who made each edit
== Languages updated ==
}
function homelink() {
- $page = Title::newFromText( wfMsgForContent( 'mainpage' ) );
- return wfElement( 'base', array(), $page->getFullUrl() );
+ return wfElement( 'base', array(), Title::newMainPage()->getFullUrl() );
}
function caseSetting() {
# Don't return to the main page if the user can't read it
# otherwise we'll end up in a pointless loop
- $mainPage = Title::newFromText( wfMsgForContent( 'mainpage' ) );
+ $mainPage = Title::newMainPage();
if( $mainPage->userCanRead() )
$this->returnToMain( true, $mainPage );
}
}
if ( '' === $returnto ) {
- $returnto = wfMsgForContent( 'mainpage' );
+ $returnto = Title::newMainPage();
}
if ( is_object( $returnto ) ) {
else { $a = ''; }
$mp = wfMsg( 'mainpage' );
- $titleObj = Title::newFromText( $mp );
- if ( is_object( $titleObj ) ) {
- $url = $titleObj->escapeLocalURL();
- } else {
- $url = '';
- }
+ $mptitle = Title::newMainPage();
+ $url = ( is_object($mptitle) ? $mptitle->escapeLocalURL() : '' );
$logourl = $this->getLogo();
$s = "<a href='{$url}'><img{$a} src='{$logourl}' alt='[{$mp}]' /></a>";
}
function mainPageLink() {
- $mp = wfMsgForContent( 'mainpage' );
- $mptxt = wfMsg( 'mainpage');
- $s = $this->makeKnownLink( $mp, $mptxt );
+ $s = $this->makeKnownLinkObj( Title::newMainPage(), wfMsg( 'mainpage' ) );
return $s;
}
}
/* these are used extensively in SkinTemplate, but also some other places */
+ static function makeMainPageUrl( $urlaction = '' ) {
+ $title = Title::newMainPage();
+ self::checkTitle( $title, $name );
+ return $title->getLocalURL( $urlaction );
+ }
+
static function makeSpecialUrl( $name, $urlaction = '' ) {
$title = SpecialPage::getTitleFor( $name );
return $title->getLocalURL( $urlaction );
$oldid = $wgRequest->getVal( 'oldid' );
$nav_urls = array();
- $nav_urls['mainpage'] = array( 'href' => self::makeI18nUrl( 'mainpage') );
+ $nav_urls['mainpage'] = array( 'href' => self::makeMainPageUrl() );
if( $wgEnableUploads ) {
if ($wgUploadNavigationUrl) {
$nav_urls['upload'] = array( 'href' => $wgUploadNavigationUrl );
}
if( is_null( $title ) ) {
# That's not supposed to happen :)
- $title = Title::newFromText( wfMsg( 'mainpage' ) );
+ $title = Title::newMainPage();
}
$wgOut->reportTime(); # for logfile
$wgOut->redirect( $title->getFullUrl() );
# Catch dud titles and return to the main page
if( is_null( $title ) )
- $title = Title::newFromText( wfMsg( 'mainpage' ) );
+ $title = Title::newMainPage();
$wgOut->reportTime();
$wgOut->redirect( $title->getFullUrl( 'redirect=no' ) );
if ( '' == $title && 'delete' != $action ) {
- $ret = Title::newFromText( wfMsgForContent( 'mainpage' ) );
+ $ret = Title::newMainPage();
} elseif ( $curid = $request->getInt( 'curid' ) ) {
# URLs like this are generated by RC, because rc_title isn't always accurate
$ret = Title::newFromID( $curid );
$s .= "<td class='bottom' align='center' valign='top'>";
$s .= $this->bottomLinks();
- $s .= "\n<br />" . $this->makeKnownLink( wfMsgForContent( "mainpage" ) ) . " | "
+ $s .= "\n<br />" . $this->makeKnownLinkObj( Title::newMainPage() ) . " | "
. $this->aboutLink() . " | "
. $this->searchForm( wfMsg( "qbfind" ) );
}
$s = "" .
- $this->makeKnownLink( wfMsgForContent( "mainpage" ), wfMsg( "mainpage" ) )
+ $this->mainPageLink()
. " | " .
$this->makeKnownLink( wfMsgForContent( "aboutpage" ), wfMsg( "about" ) )
. " | " .
}
function logopath() { return $GLOBALS['wgLogo']; }
- function mainpage() { return self::makeI18nUrl( 'mainpage' ); }
+ function mainpage() { return self::makeMainPageUrl(); }
function sidebar( $startSection, $endSection, $innerTpl ) {
$s = '';