* You will only be adding bloat to the page and causing page caches to have to be purged on configuration changes.
*/
static function makeGlobalVariablesScript( $skinName ) {
- global $wgTitle, $wgUser, $wgRequest, $wgArticle, $wgOut, $wgRestrictionTypes, $wgUseAjax, $wgEnableMWSuggest;
+ global $wgTitle, $wgUser, $wgRequest, $wgArticle, $wgOut, $wgUseAjax, $wgEnableMWSuggest;
$ns = $wgTitle->getNamespace();
$nsname = MWNamespace::exists( $ns ) ? MWNamespace::getCanonicalName( $ns ) : $wgTitle->getNsText();
'wgCategories' => $wgOut->getCategories(),
'wgBreakFrames' => $wgOut->getFrameOptions() == 'DENY',
);
- foreach ( $wgRestrictionTypes as $type ) {
+ foreach ( $wgTitle->getRestrictionTypes() as $type ) {
$vars['wgRestriction' . ucfirst( $type )] = $wgTitle->getRestrictions( $type );
}
if ( $wgUseAjax && $wgEnableMWSuggest && !$wgUser->getOption( 'disablesuggest', false ) ) {
// Allow for site and per-namespace customization of copyright notice.
$forContent = true;
- if ( isset( $wgArticle ) ) {
- wfRunHooks( 'SkinCopyrightFooter', array( $wgArticle->getTitle(), $type, &$msg, &$link, &$forContent ) );
- }
+ wfRunHooks( 'SkinCopyrightFooter', array( $this->mTitle, $type, &$msg, &$link, &$forContent ) );
if ( $forContent ) {
$out .= wfMsgForContent( $msg, $link );