mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 06:03:49 +00:00
Fix undeclared variable
The variable was declared in the "if" branch but also used in the "else" one. This caused the rules textarea to not have the readonly attribute if the user wasn't allowed and CodeEditor wasn't installed. Change-Id: I2bf69dc0f2d24efac41d1ac6100ed7e286e3afa4
This commit is contained in:
parent
b18e763c7e
commit
99f32a1408
|
@ -90,6 +90,7 @@ abstract class AbuseFilterView extends ContextSource {
|
|||
}
|
||||
|
||||
$rules = rtrim( $rules ) . "\n";
|
||||
$canEdit = $this->canEdit();
|
||||
|
||||
if ( ExtensionRegistry::getInstance()->isLoaded( 'CodeEditor' ) ) {
|
||||
$editorAttrib['name'] = 'wpAceFilterEditor';
|
||||
|
@ -115,7 +116,6 @@ abstract class AbuseFilterView extends ContextSource {
|
|||
}
|
||||
$rulesContainer .= Xml::textarea( $textName, $rules, 40, 15, $textareaAttribs );
|
||||
|
||||
$canEdit = $this->canEdit();
|
||||
$editorConfig = AbuseFilter::getAceConfig( $canEdit );
|
||||
|
||||
// Add Ace configuration variable
|
||||
|
|
Loading…
Reference in a new issue