}
$out = $this->getOutput();
- $user = $this->getUser();
wfProfileIn( __METHOD__ . '-init' );
$this->initPage( $out );
* initialize various variables and generate the template
*
* @since 1.23
- * @param $out OutputPage
* @return QuickTemplate the template to be executed by outputPage
*/
- protected function prepareQuickTemplate( OutputPage $out = null ) {
+ protected function prepareQuickTemplate() {
global $wgContLang, $wgScript, $wgStylePath,
$wgMimeType, $wgJsMimeType, $wgXhtmlNamespaces, $wgHtml5Version,
$wgDisableCounters, $wgSitename, $wgLogo, $wgMaxCredits,
$title = $this->getTitle();
$request = $this->getRequest();
+ $out = $this->getOutput();
$tpl = $this->setupTemplateForOutput();
wfProfileIn( __METHOD__ . '-stuff-head' );
}
}
- if ( $title->getNamespace() !== NS_MEDIAWIKI && $title->quickUserCan( 'protect', $user ) && $title->getRestrictionTypes() ) {
+ if ( $title->quickUserCan( 'protect', $user ) && $title->getRestrictionTypes() &&
+ MWNamespace::getRestrictionLevels( $title->getNamespace(), $user ) !== array( '' )
+ ) {
$mode = $title->isProtected() ? 'unprotect' : 'protect';
$content_navigation['actions'][$mode] = array(
'class' => ( $onPage && $action == $mode ) ? 'selected' : false,
echo htmlspecialchars( $this->data[$str] );
}
- /**
- * @private
- * @deprecated since 1.21; use Xml::encodeJsVar() or Xml::encodeJsCall() instead
- */
- function jstext( $str ) {
- wfDeprecated( __METHOD__, '1.21' );
- echo Xml::escapeJsString( $this->data[$str] );
- }
-
/**
* @private
*/