}
global $wgScript, $wgTitle, $wgStylePath, $wgUser, $wgScriptExtension;
global $wgArticlePath, $wgScriptPath, $wgServer, $wgContLang, $wgLang;
- global $wgCanonicalNamespaceNames, $wgOut, $wgArticle;
+ global $wgOut, $wgArticle;
global $wgBreakFrames, $wgRequest, $wgVariantArticlePath, $wgActionPaths;
global $wgUseAjax, $wgAjaxWatch;
global $wgVersion, $wgEnableAPI, $wgEnableWriteAPI;
global $wgRestrictionTypes, $wgLivePreview;
global $wgMWSuggestTemplate, $wgDBname, $wgEnableMWSuggest;
+ global $wgSitename, $wgEnableIframeApiProxy, $wgEnableJS2system;
$ns = $wgTitle->getNamespace();
- $nsname = isset( $wgCanonicalNamespaceNames[ $ns ] ) ? $wgCanonicalNamespaceNames[ $ns ] : $wgTitle->getNsText();
+ $nsname = MWNamespace::exists( $ns ) ? MWNamespace::getCanonicalName( $ns ) : $wgTitle->getNsText();
$separatorTransTable = $wgContLang->separatorTransformTable();
$separatorTransTable = $separatorTransTable ? $separatorTransTable : array();
$compactSeparatorTransTable = array(
$vars = array(
'skin' => $skinName,
'stylepath' => $wgStylePath,
+ 'urlprotocols' => wfUrlProtocols(),
'wgArticlePath' => $wgArticlePath,
'wgScriptPath' => $wgScriptPath,
'wgScriptExtension' => $wgScriptExtension,
'wgActionPaths' => (object)$wgActionPaths,
'wgServer' => $wgServer,
'wgCanonicalNamespace' => $nsname,
- 'wgCanonicalSpecialPageName' => SpecialPage::resolveAlias( $wgTitle->getDBkey() ),
+ 'wgCanonicalSpecialPageName' => $ns == NS_SPECIAL ?
+ SpecialPage::resolveAlias( $wgTitle->getDBkey() ) : false, # bug 21115
'wgNamespaceNumber' => $wgTitle->getNamespace(),
'wgPageName' => $wgTitle->getPrefixedDBKey(),
'wgTitle' => $wgTitle->getText(),
'wgMainPageTitle' => $mainPage ? $mainPage->getPrefixedText() : null,
'wgFormattedNamespaces' => $wgContLang->getFormattedNamespaces(),
'wgNamespaceIds' => $wgContLang->getNamespaceIds(),
+ 'wgSiteName' => $wgSitename,
);
if ( $wgContLang->hasVariants() ) {
$vars['wgUserVariant'] = $wgContLang->getPreferredVariant();
$vars['wgLivepreviewMessageError'] = wfMsg( 'livepreview-error' );
}
+ //add api proxy var and script link if on the special proxy page:
+ if( $wgEnableJS2system &&
+ $wgTitle->getNamespace() == NS_MEDIAWIKI &&
+ $wgTitle->getDBKey() == 'ApiProxy' )
+ {
+ $vars['wgEnableIframeApiProxy'] = $wgEnableIframeApiProxy;
+ //also add the apiProxy Page script if we are on that page
+ if( $wgEnableIframeApiProxy )
+ $wgOut->addScriptClass( 'apiProxyPage' );
+ }
+
if ( $wgOut->isArticleRelated() && $wgUseAjax && $wgAjaxWatch && $wgUser->isLoggedIn() ) {
$msgs = (object)array();
foreach ( array( 'watch', 'unwatch', 'watching', 'unwatching' ) as $msgName ) {
$catlinks = $this->getCategoryLinks();
$classes = 'catlinks';
-
+
// Check what we're showing
global $wgOut, $wgUser;
$allCats = $wgOut->getCategoryLinks();
else
$ret .= str_repeat( "<ul><li>\n", $diff );
$ret .= $display . "\n";
-
+
$curIdent = $ident;
}
$ret .= str_repeat( '</li></ul>', $curIdent ) . '</li>';