$lang = $title->getPageLanguage();
$variants = $lang->getVariants();
- if ( !$wgDisableLangConversion && sizeof( $variants ) > 1
+ if ( !$wgDisableLangConversion && count( $variants ) > 1
&& !$title->isSpecialPage() ) {
foreach ( $variants as $code ) {
$varname = $lang->getVariantname( $code );
$s .= $this->deleteThisPage();
}
- if ( $wgUser->isAllowed( 'protect' ) ) {
+ if ( $wgUser->isAllowed( 'protect' ) && $title->getRestrictionTypes() ) {
$s .= $sep . $this->protectThisPage();
}
$diff = $wgRequest->getVal( 'diff' );
$title = $this->getSkin()->getTitle();
- if ( $title->getArticleID() && ( ! $diff ) && $wgUser->isAllowed( 'protect' ) ) {
+ if ( $title->getArticleID() && ( ! $diff ) && $wgUser->isAllowed( 'protect' ) && $title->getRestrictionTypes() ) {
if ( $title->isProtected() ) {
$text = wfMessage( 'unprotectthispage' )->text();
$query = array( 'action' => 'unprotect' );