r48857 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48856‎ | r48857 | r48858 >
Date:04:44, 26 March 2009
Author:werdna
Status:ok (Comments)
Tags:
Comment:
Remove accidentally-committed code in r48856
Modified paths:
  • /trunk/extensions/AbuseFilter/AbuseFilter.i18n.php (modified) (history)
  • /trunk/extensions/AbuseFilter/AbuseFilter.php (modified) (history)
  • /trunk/extensions/AbuseFilter/Views/AbuseFilterViewEdit.php (modified) (history)
  • /trunk/extensions/AbuseFilter/Views/AbuseFilterViewList.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AbuseFilter/AbuseFilter.php
@@ -107,8 +107,3 @@
108108 $wgAbuseFilterUDPPrefix = 'abusefilter:';
109109 $wgAbuseFilterUDPAddress = null;
110110 $wgAbuseFilterUDPPort = null;
111 -
112 -// Centralised filters
113 -$wgAbuseFilterCentralDB = null;
114 -$wgAbuseFilterIsCentral = false;
115 -
Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewList.php
@@ -153,9 +153,7 @@
154154 'tables' => array('abuse_filter', 'abuse_filter_action'),
155155 'fields' => array(
156156 'af_id',
157 - 'af_enabled',
158 - 'af_deleted',
159 - 'af_global',
 157+ '(af_enabled | af_deleted << 1) AS status',
160158 'af_public_comments',
161159 'af_hidden',
162160 'af_hit_count',
@@ -222,19 +220,12 @@
223221 }
224222 return htmlspecialchars( implode( ', ', $displayActions ) );
225223 case 'status':
226 - $statuses = array();
227 - if ($row->af_deleted)
228 - $statuses[] = wfMsgExt( 'abusefilter-deleted', 'parseinline' );
229 - elseif ($row->af_enabled)
230 - $statuses[] = wfMsgExt( 'abusefilter-enabled', 'parseinline' );
 224+ if ($value & 2)
 225+ return wfMsgExt( 'abusefilter-deleted', 'parseinline' );
 226+ elseif ($value & 1)
 227+ return wfMsgExt( 'abusefilter-enabled', 'parseinline' );
231228 else
232 - $statuses[] = wfMsgExt( 'abusefilter-disabled', 'parseinline' );
233 -
234 - global $wgAbuseFilterIsCentral;
235 - if ($row->af_global && $wgAbuseFilterIsCentral)
236 - $statuses[] = wfMsgExt( 'abusefilter-status-global', 'parseinline' );
237 -
238 - return $wgLang->semicolonList( $statuses );
 229+ return wfMsgExt( 'abusefilter-disabled', 'parseinline' );
239230 case 'af_hidden':
240231 $msg = $value ? 'abusefilter-hidden' : 'abusefilter-unhidden';
241232 return wfMsgExt( $msg, 'parseinline' );
Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewEdit.php
@@ -280,10 +280,6 @@
281281 // Build checkboxen
282282 $checkboxes = array( 'hidden', 'enabled', 'deleted' );
283283 $flags = '';
284 -
285 - global $wgAbuseFilterIsCentral;
286 - if ($wgAbuseFilterIsCentral)
287 - $checkboxes[] = 'global';
288284
289285 if (isset($row->af_throttled) && $row->af_throttled) {
290286 global $wgAbuseFilterEmergencyDisableThreshold;
@@ -586,7 +582,6 @@
587583 $obj->af_pattern = '';
588584 $obj->af_enabled = 1;
589585 $obj->af_hidden = 0;
590 - $obj->af_global = 0;
591586 return array( $obj, array() );
592587 }
593588
@@ -646,8 +641,6 @@
647642 $row->af_deleted = $wgRequest->getBool( 'wpFilterDeleted' );
648643 $row->af_enabled = $wgRequest->getBool( 'wpFilterEnabled' ) && !$row->af_deleted;
649644 $row->af_hidden = $wgRequest->getBool( 'wpFilterHidden' );
650 - global $wgAbuseFilterIsCentral;
651 - $row->af_global = $wgRequest->getBool( 'wpFilterGlobal' ) && $wgAbuseFilterIsCentral;
652645
653646 // Actions
654647 global $wgAbuseFilterAvailableActions;
Index: trunk/extensions/AbuseFilter/AbuseFilter.i18n.php
@@ -118,7 +118,6 @@
119119 'abusefilter-tools' => 'Abuse filter tools',
120120 'abusefilter-loglink' => 'View the abuse log',
121121 'abusefilter-return' => 'Return to filter management',
122 - 'abusefilter-status-global' => 'Global',
123122
124123 // Options form
125124 'abusefilter-list-options' => 'Options',
@@ -205,7 +204,6 @@
206205 'abusefilter-edit-revert' => 'Revert actions taken by this filter',
207206 'abusefilter-edit-tools' => 'Tools:',
208207 'abusefilter-edit-test-link' => 'Test this filter against recent edits',
209 - 'abusefilter-edit-global' => 'Apply this filter globally',
210208
211209 // Filter editing helpers
212210 'abusefilter-edit-builder-select' => 'Select an option to add it at the cursor',

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r48856Fix batch-testing (follow-up to r48855)werdna04:41, 26 March 2009

Comments

#Comment by Tim Starling (talk | contribs)   06:26, 20 May 2009

I liked the other one. What's with the (af_enabled | af_deleted << 1), does an extra array element take up too much space?

Status & tagging log