global $wgOut;
$wgOut->setRobotPolicy( 'noindex,nofollow' );
+ $wgOut->addBacklinkSubtitle( $this->mTitle );
if ( is_array( $err ) ) {
$wgOut->wrapWikiMsg( "<p class='error'>\n$1\n</p>\n", $err );
$wgOut->addHTML( "<p class='error'>{$err}</p>\n" );
}
+ if ( $this->mTitle->getRestrictionTypes() === array() ) {
+ // No restriction types available for the current title
+ // this might happen if an extension alters the available types
+ $wgOut->setPageTitle( wfMessage( 'protect-norestrictiontypes-title', $this->mTitle->getPrefixedText() ) );
+ $wgOut->addWikiText( wfMessage( 'protect-norestrictiontypes-text' )->text() );
+
+ // Show the log in case protection was possible once
+ $this->showLogExtract( $wgOut );
+ // return as there isn't anything else we can do
+ return;
+ }
+
list( $cascadeSources, /* $restrictions */ ) = $this->mTitle->getCascadeProtectionSources();
if ( $cascadeSources && count($cascadeSources) > 0 ) {
$titles = '';
wfEscapeWikiText( $this->mTitle->getPrefixedText() ) );
}
- $wgOut->addBacklinkSubtitle( $this->mTitle );
$wgOut->addHTML( $this->buildForm() );
$this->showLogExtract( $wgOut );
}
Go back to the previous page, reload that page and then try again.',
# Protect
-'protectlogpage' => 'Protection log',
-'protectlogtext' => 'Below is a list of changes to page protections.
+'protectlogpage' => 'Protection log',
+'protectlogtext' => 'Below is a list of changes to page protections.
See the [[Special:ProtectedPages|protected pages list]] for the list of currently operational page protections.',
-'protectedarticle' => 'protected "[[$1]]"',
-'modifiedarticleprotection' => 'changed protection level for "[[$1]]"',
-'unprotectedarticle' => 'removed protection from "[[$1]]"',
-'movedarticleprotection' => 'moved protection settings from "[[$2]]" to "[[$1]]"',
-'protect-title' => 'Change protection level for "$1"',
-'protect-title-notallowed' => 'View protection level of "$1"',
-'prot_1movedto2' => '[[$1]] moved to [[$2]]',
-'protect-badnamespace-title' => 'Non-protectable namespace',
-'protect-badnamespace-text' => 'Pages in this namespace cannot be protected.',
-'protect-legend' => 'Confirm protection',
-'protectcomment' => 'Reason:',
-'protectexpiry' => 'Expires:',
-'protect_expiry_invalid' => 'Expiry time is invalid.',
-'protect_expiry_old' => 'Expiry time is in the past.',
-'protect-unchain-permissions' => 'Unlock further protect options',
-'protect-text' => "Here you may view and change the protection level for the page '''$1'''.",
-'protect-locked-blocked' => "You cannot change protection levels while blocked.
+'protectedarticle' => 'protected "[[$1]]"',
+'modifiedarticleprotection' => 'changed protection level for "[[$1]]"',
+'unprotectedarticle' => 'removed protection from "[[$1]]"',
+'movedarticleprotection' => 'moved protection settings from "[[$2]]" to "[[$1]]"',
+'protect-title' => 'Change protection level for "$1"',
+'protect-title-notallowed' => 'View protection level of "$1"',
+'prot_1movedto2' => '[[$1]] moved to [[$2]]',
+'protect-badnamespace-title' => 'Non-protectable namespace',
+'protect-badnamespace-text' => 'Pages in this namespace cannot be protected.',
+'protect-norestrictiontypes-title' => 'Non-protectable page',
+'protect-norestrictiontypes-text' => 'This page can\'t be protected as there aren\'t any restriction types available.',
+'protect-legend' => 'Confirm protection',
+'protectcomment' => 'Reason:',
+'protectexpiry' => 'Expires:',
+'protect_expiry_invalid' => 'Expiry time is invalid.',
+'protect_expiry_old' => 'Expiry time is in the past.',
+'protect-unchain-permissions' => 'Unlock further protect options',
+'protect-text' => "Here you may view and change the protection level for the page '''$1'''.",
+'protect-locked-blocked' => "You cannot change protection levels while blocked.
Here are the current settings for the page '''$1''':",
-'protect-locked-dblock' => "Protection levels cannot be changed due to an active database lock.
+'protect-locked-dblock' => "Protection levels cannot be changed due to an active database lock.
Here are the current settings for the page '''$1''':",
-'protect-locked-access' => "Your account does not have permission to change page protection levels.
+'protect-locked-access' => "Your account does not have permission to change page protection levels.
Here are the current settings for the page '''$1''':",
-'protect-cascadeon' => "This page is currently protected because it is included in the following {{PLURAL:$1|page, which has|pages, which have}} cascading protection turned on.
+'protect-cascadeon' => "This page is currently protected because it is included in the following {{PLURAL:$1|page, which has|pages, which have}} cascading protection turned on.
You can change this page's protection level, but it will not affect the cascading protection.",
'protect-default' => 'Allow all users',
'protect-fallback' => 'Require "$1" permission',
** Excessive spamming
** Counter-productive edit warring
** High traffic page',
-'protect-edit-reasonlist' => 'Edit protection reasons',
-'protect-expiry-options' => '1 hour:1 hour,1 day:1 day,1 week:1 week,2 weeks:2 weeks,1 month:1 month,3 months:3 months,6 months:6 months,1 year:1 year,infinite:infinite',
-'restriction-type' => 'Permission:',
-'restriction-level' => 'Restriction level:',
-'minimum-size' => 'Min size',
-'maximum-size' => 'Max size:',
-'pagesize' => '(bytes)',
+'protect-edit-reasonlist' => 'Edit protection reasons',
+'protect-expiry-options' => '1 hour:1 hour,1 day:1 day,1 week:1 week,2 weeks:2 weeks,1 month:1 month,3 months:3 months,6 months:6 months,1 year:1 year,infinite:infinite',
+'restriction-type' => 'Permission:',
+'restriction-level' => 'Restriction level:',
+'minimum-size' => 'Min size',
+'maximum-size' => 'Max size:',
+'pagesize' => '(bytes)',
# Restrictions (nouns)
'restriction-edit' => 'Edit',