r41153 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41152‎ | r41153 | r41154 >
Date:14:07, 22 September 2008
Author:werdna
Status:old
Tags:
Comment:
Revert r41145. Restoring autoconfirmed should really have access control, eh?
Modified paths:
  • /trunk/extensions/AbuseFilter/AbuseFilter.class.php (modified) (history)
  • /trunk/extensions/AbuseFilter/AbuseFilter.i18n.php (modified) (history)
  • /trunk/extensions/AbuseFilter/AbuseFilter.php (modified) (history)
  • /trunk/extensions/AbuseFilter/SpecialAbuseFilter.php (modified) (history)
  • /trunk/extensions/AbuseFilter/abusefilter.tables.sql (modified) (history)

Diff [purge]

Index: trunk/extensions/AbuseFilter/AbuseFilter.php
@@ -69,5 +69,4 @@
7070 $wgAbuseFilterNativeExpressionEvaluator = "$dir/parser_native/af_expr";
7171
7272 $wgAjaxExportList[] = 'AbuseFilter::ajaxCheckSyntax';
73 -$wgAjaxExportList[] = 'AbuseFilter::ajaxEvaluateExpression';
74 -$wgAjaxExportList[] = 'AbuseFilter::ajaxReAutoconfirm';
\ No newline at end of file
 73+$wgAjaxExportList[] = 'AbuseFilter::ajaxEvaluateExpression';
\ No newline at end of file
Index: trunk/extensions/AbuseFilter/SpecialAbuseFilter.php
@@ -152,28 +152,9 @@
153153
154154 var el = document.getElementById( 'mw-abusefilter-expr-result' );
155155 changeText( el, response );
156 - }
157 - function doReautoSubmit()
158 - {
159 - var name = document.getElementById('reautoconfirm-user').value;
160 - injectSpinner( document.getElementById( 'mw-abusefilter-reautoconfirmsubmit' ), 'abusefilter-reautoconfirm' );
161 - sajax_do_call( 'AbuseFilter::ajaxReAutoconfirm', [name], processReautoconfirm );
162 - }
163 - function processReautoconfirm( request ) {
164 - var response = request.responseText;
165 -
166 - removeSpinner( 'abusefilter-reautoconfirm' );
167 - }
168 - ";
 156+ }";
169157
170158 $wgOut->addInlineScript( $exprScript );
171 -
172 - // Hacky little box to re-enable autoconfirmed if it got disabled
173 - $rac = '';
174 - $rac .= Xml::inputLabel( wfMsg( 'abusefilter-tools-reautoconfirm-user' ), 'wpReAutoconfirmUser', 'reautoconfirm-user', 45 );
175 - $rac .= Xml::element( 'input', array( 'type' => 'button', 'id' => 'mw-abusefilter-reautoconfirmsubmit', 'onclick' => 'doReautoSubmit();', 'value' => wfMsg( 'abusefilter-tools-reautoconfirm-submit' ) ) );
176 - $rac = Xml::fieldset( wfMsg( 'abusefilter-tools-reautoconfirm' ), $rac );
177 - $wgOut->addHtml( $rac );
178159 }
179160
180161 function showStatus() {
Index: trunk/extensions/AbuseFilter/AbuseFilter.class.php
@@ -91,14 +91,6 @@
9292 return $parser->evaluateExpression( $expr );
9393 }
9494
95 - public static function ajaxReAutoconfirm( $username ) {
96 - $u = User::newFromName( $username );
97 -
98 - global $wgMemc;
99 - $k = AbuseFilter::autoPromoteBlockKey($u);
100 - $wgMemc->delete( $k );
101 - }
102 -
10395 public static function ajaxEvaluateExpression( $expr ) {
10496 return self::evaluateExpression( $expr );
10597 }
Index: trunk/extensions/AbuseFilter/AbuseFilter.i18n.php
@@ -103,9 +103,6 @@
104104 'abusefilter-tools-text' => 'Here are some tools which may be useful in formulating and debugging abuse filters. [[Special:AbuseFilter|Return to main menu]]',
105105 'abusefilter-tools-expr' => 'Expression tester',
106106 'abusefilter-tools-submitexpr' => 'Evaluate',
107 - 'abusefilter-tools-reautoconfirm' => 'Restore autoconfirmed status',
108 - 'abusefilter-tools-reautoconfirm-user' => 'User',
109 - 'abusefilter-tools-reautoconfirm-submit' => 'Re-autoconfirm',
110107
111108 // Abuse filter status
112109 'abusefilter-status' => "Of the last $1 {{PLURAL:$1|action|actions}}, $2 ($3%) {{PLURAL:$2|has|have}} reached the condition limit of $4. $5 ($6%) {{PLURAL:$5|has|have}} matched one of the filters currently enabled.",
Index: trunk/extensions/AbuseFilter/abusefilter.tables.sql
@@ -59,7 +59,6 @@
6060 afh_flags TINYBLOB NOT NULL,
6161 afh_public_comments TINYBLOB,
6262 afh_actions BLOB,
63 - afh_deleted tinyint(1) NOT NULL DEFAULT 0,
6463
6564 PRIMARY KEY (afh_id),
6665 KEY (afh_filter),

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r41145Add a hacky tool for restoring autoconfirmed status when it's blocked by a fi...werdna09:16, 22 September 2008