function outputPage( &$out ) {
global $wgTitle, $wgArticle, $wgUser, $wgLang, $wgContLang, $wgOut;
global $wgScript, $wgStylePath, $wgLanguageCode, $wgContLanguageCode, $wgUseNewInterlanguage;
- global $wgMimeType, $wgOutputEncoding, $wgUseDatabaseMessages, $wgRequest;
+ global $wgMimeType, $wgJsMimeType, $wgOutputEncoding, $wgUseDatabaseMessages, $wgRequest;
global $wgDisableCounters, $wgLogo, $action, $wgFeedClasses;
global $wgMaxCredits, $wgShowCreditsIfMax;
global $wgPageShowWatchingUsers;
$tpl->set( 'feeds', false );
}
$tpl->setRef( 'mimetype', $wgMimeType );
+ $tpl->setRef( 'jsmimetype', $wgJsMimeType );
$tpl->setRef( 'charset', $wgOutputEncoding );
$tpl->set( 'headlinks', $out->getHeadLinks() );
$tpl->setRef( 'wgScript', $wgScript );
);
$personal_urls['mycontris'] = array(
'text' => wfMsg('mycontris'),
- 'href' => $this->makeSpecialUrl('Contributions','target=' . urlencode( $this->username ) )
+ 'href' => $this->makeSpecialUrl("Contributions/$this->username")
);
$personal_urls['logout'] = array(
'text' => wfMsg('userlogout'),
* @access private
*/
function buildContentActionUrls () {
- global $wgContLang, $wgUseValidation;
+ global $wgContLang, $wgUseValidation, $wgDBprefix;
$fname = 'SkinTemplate::buildContentActionUrls';
wfProfileIn( $fname );
$content_actions['move'] = array(
'class' => ($this->mTitle->getDbKey() == 'Movepage' and $this->mTitle->getNamespace == NS_SPECIAL) ? 'selected' : false,
'text' => wfMsg('move'),
- 'href' => $this->makeSpecialUrl('Movepage', 'target='. urlencode( $this->thispage ) )
+ 'href' => $this->makeSpecialUrl("Movepage/$this->thispage" )
);
}
}
$content_actions['undelete'] = array(
'class' => false,
'text' => ($n == 1) ? wfMsg( 'undelete_short1' ) : wfMsg('undelete_short', $n ),
- 'href' => $this->makeSpecialUrl('Undelete/'.$this->thispage)
+ 'href' => $this->makeSpecialUrl("Undelete/$this->thispage")
);
}
}
{# Trying to get the current article revision through this weird stunt
$tid = $this->mTitle->getArticleID();
$tns = $this->mTitle->getNamespace();
- $sql = "SELECT page_latest FROM page WHERE page_id={$tid} AND page_namespace={$tns}" ;
+ $sql = "SELECT page_latest FROM {$wgDBprefix}page WHERE page_id={$tid} AND page_namespace={$tns}" ;
$res = wfQuery( $sql, DB_READ );
if( $s = wfFetchObject( $res ) )
$oid = $s->page_latest ;
$nav_urls = array();
$nav_urls['mainpage'] = array('href' => $this->makeI18nUrl('mainpage'));
- $nav_urls['randompage'] = array('href' => $this->makeSpecialUrl('Randompage'));
+ $nav_urls['randompage'] = array('href' => $this->makeSpecialUrl('Random'));
$nav_urls['recentchanges'] = array('href' => $this->makeSpecialUrl('Recentchanges'));
$nav_urls['currentevents'] = (wfMsgForContent('currentevents') != '-') ? array('href' => $this->makeI18nUrl('currentevents')) : false;
$nav_urls['portal'] = (wfMsgForContent('portal') != '-') ? array('href' => $this->makeI18nUrl('portal-url')) : false;
$nav_urls['specialpages'] = array('href' => $this->makeSpecialUrl('Specialpages'));
if( $this->mTitle->getNamespace() != NS_SPECIAL) {
- $nav_urls['whatlinkshere'] = array('href' => $this->makeSpecialUrl('Whatlinkshere', 'target='.urlencode( $this->thispage)));
- $nav_urls['recentchangeslinked'] = array('href' => $this->makeSpecialUrl('Recentchangeslinked', 'target='.urlencode( $this->thispage)));
+ $nav_urls['whatlinkshere'] = array(
+ 'href' => $this->makeSpecialUrl("Whatlinkshere/$this->thispage")
+ );
+ $nav_urls['recentchangeslinked'] = array(
+ 'href' => $this->makeSpecialUrl("Recentchangeslinked/$this->thispage")
+ );
}
if( $this->mTitle->getNamespace() == NS_USER || $this->mTitle->getNamespace() == NS_USER_TALK ) {
if($id || $ip) { # both anons and non-anons have contri list
$nav_urls['contributions'] = array(
- 'href' => $this->makeSpecialUrl('Contributions', "target=" . $this->mTitle->getPartialURL() )
+ 'href' => $this->makeSpecialUrl('Contributions/' . $this->mTitle->getText() )
);
} else {
$nav_urls['contributions'] = false;
$nav_urls['emailuser'] = false;
if( $this->showEmailUser( $id ) ) {
$nav_urls['emailuser'] = array(
- 'href' => $this->makeSpecialUrl('Emailuser', "target=" . $this->mTitle->getPartialURL() )
+ 'href' => $this->makeSpecialUrl('Emailuser/' . $this->mTitle->getText() )
);
}
wfProfileOut( $fname );
$fname = 'SkinTemplate::setupUserJs';
wfProfileIn( $fname );
- global $wgRequest, $wgAllowUserJs;
+ global $wgRequest, $wgAllowUserJs, $wgJsMimeType;
$action = $wgRequest->getText('action');
if( $wgAllowUserJs && $this->loggedin ) {
# XXX: additional security check/prompt?
$this->userjsprev = '/*<![CDATA[*/ ' . $wgRequest->getText('wpTextbox1') . ' /*]]>*/';
} else {
- $this->userjs = $this->makeUrl($this->userpage.'/'.$this->skinname.'.js', 'action=raw&ctype=text/javascript&dontcountme=s');
+ $this->userjs = $this->makeUrl($this->userpage.'/'.$this->skinname.'.js', 'action=raw&ctype='.$wgJsMimeType.'&dontcountme=s');
}
}
wfProfileOut( $fname );