$this->mReasonSelection = $wgRequest->getText( 'wpProtectReasonSelection' );
$this->mCascade = $wgRequest->getBool( 'mwProtect-cascade', $this->mCascade );
$this->mReasonSelection = $wgRequest->getText( 'wpProtectReasonSelection' );
$this->mCascade = $wgRequest->getBool( 'mwProtect-cascade', $this->mCascade );
// @todo FIXME: This form currently requires individual selections,
// but the db allows multiples separated by commas.
// @todo FIXME: This form currently requires individual selections,
// but the db allows multiples separated by commas.
$q = $this->mArticle->isRedirect() ? 'redirect=no' : '';
$wgOut->redirect( $this->mTitle->getFullURL( $q ) );
}
$q = $this->mArticle->isRedirect() ? 'redirect=no' : '';
$wgOut->redirect( $this->mTitle->getFullURL( $q ) );
}
# to a semi-protected page.
$edit_restriction = isset( $this->mRestrictions['edit'] ) ? $this->mRestrictions['edit'] : '';
$this->mCascade = $wgRequest->getBool( 'mwProtect-cascade' );
# to a semi-protected page.
$edit_restriction = isset( $this->mRestrictions['edit'] ) ? $this->mRestrictions['edit'] : '';
$this->mCascade = $wgRequest->getBool( 'mwProtect-cascade' );
- if ( $this->mCascade && ($edit_restriction != 'protect') &&
- !User::groupHasPermission( $edit_restriction, 'protect' ) )
+ if ( $this->mCascade && ( $edit_restriction != 'protect' ) &&
+ !User::groupHasPermission( $edit_restriction, 'protect' ) ) {
$status = $this->mArticle->doUpdateRestrictions( $this->mRestrictions, $expiry, $this->mCascade, $reasonstr, $wgUser );
$status = $this->mArticle->doUpdateRestrictions( $this->mRestrictions, $expiry, $this->mCascade, $reasonstr, $wgUser );
$wgOut->addModules( 'mediawiki.legacy.protect' );
$out .= Xml::openElement( 'form', array( 'method' => 'post',
'action' => $this->mTitle->getLocalURL( 'action=protect' ),
$wgOut->addModules( 'mediawiki.legacy.protect' );
$out .= Xml::openElement( 'form', array( 'method' => 'post',
'action' => $this->mTitle->getLocalURL( 'action=protect' ),
Xml::openElement( 'table', array( 'id' => 'mwProtectSet' ) ) .
Xml::openElement( 'tbody' );
Xml::openElement( 'table', array( 'id' => 'mwProtectSet' ) ) .
Xml::openElement( 'tbody' );
if ( strpos( $option, ":" ) === false ) {
$show = $value = $option;
} else {
if ( strpos( $option, ":" ) === false ) {
$show = $value = $option;
} else {
$expiryFormOptions .= Xml::option( $show, $value, $this->mExpirySelection[$action] === $value ) . "\n";
}
# Add expiry dropdown
$expiryFormOptions .= Xml::option( $show, $value, $this->mExpirySelection[$action] === $value ) . "\n";
}
# Add expiry dropdown
$out .= Xml::closeElement( 'tbody' ) . Xml::closeElement( 'table' );
// JavaScript will add another row with a value-chaining checkbox
$out .= Xml::closeElement( 'tbody' ) . Xml::closeElement( 'table' );
// JavaScript will add another row with a value-chaining checkbox
$out .= Xml::openElement( 'table', array( 'id' => 'mw-protect-table2' ) ) .
Xml::openElement( 'tbody' );
$out .= '<tr>
$out .= Xml::openElement( 'table', array( 'id' => 'mw-protect-table2' ) ) .
Xml::openElement( 'tbody' );
$out .= '<tr>
$out .= Xml::openElement( 'table', array( 'id' => 'mw-protect-table3' ) ) .
Xml::openElement( 'tbody' );
$out .= "
$out .= Xml::openElement( 'table', array( 'id' => 'mw-protect-table3' ) ) .
Xml::openElement( 'tbody' );
$out .= "
) + $this->disabledAttrib;
$out = Xml::openElement( 'select', $attribs );
) + $this->disabledAttrib;
$out = Xml::openElement( 'select', $attribs );
$out .= Xml::option( $this->getOptionLabel( $key ), $key, $key == $selected );
}
$out .= Xml::closeElement( 'select' );
$out .= Xml::option( $this->getOptionLabel( $key ), $key, $key == $selected );
}
$out .= Xml::closeElement( 'select' );
global $wgRestrictionLevels, $wgOut;
$cascadeableLevels = array();
global $wgRestrictionLevels, $wgOut;
$cascadeableLevels = array();