r95573 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95572‎ | r95573 | r95574 >
Date:20:26, 26 August 2011
Author:johnduhart
Status:ok
Tags:
Comment:
Followup r95572 to change variable names and use an associative array per Krinkle and Roan on IRC
Modified paths:
  • /trunk/extensions/AbuseFilter/AbuseFilter.hooks.php (modified) (history)
  • /trunk/extensions/AbuseFilter/modules/ext.abuseFilter.edit.js (modified) (history)
  • /trunk/extensions/AbuseFilter/modules/ext.abuseFilter.examine.js (modified) (history)

Diff [purge]

Index: trunk/extensions/AbuseFilter/AbuseFilter.hooks.php
@@ -284,12 +284,14 @@
285285 */
286286 public static function onMakeGlobalVariablesScript( array &$vars ) {
287287 if ( AbuseFilter::$editboxName !== null ) {
288 - $vars['wgFilterBoxName'] = AbuseFilter::$editboxName;
 288+ $vars['abuseFilterBoxName'] = AbuseFilter::$editboxName;
289289 }
290290
291291 if ( AbuseFilterViewExamine::$examineType !== null ) {
292 - $vars['wgExamineType'] = AbuseFilterViewExamine::$examineType;
293 - $vars['wgExamineId'] = AbuseFilterViewExamine::$examineId;
 292+ $vars['abuseFilterExamine'] = array(
 293+ 'type' => AbuseFilterViewExamine::$examineType,
 294+ 'id' => AbuseFilterViewExamine::$examineId,
 295+ );
294296 }
295297 return true;
296298 }
Index: trunk/extensions/AbuseFilter/modules/ext.abuseFilter.edit.js
@@ -7,7 +7,7 @@
88 *
99 * @var {jQuery}
1010 */
11 - var $filterBox = $( '#' + mw.config.get( 'wgFilterBoxName' ) );
 11+ var $filterBox = $( '#' + mw.config.get( 'abuseFilterBoxName' ) );
1212
1313 /**
1414 * Reference to this
Index: trunk/extensions/AbuseFilter/modules/ext.abuseFilter.examine.js
@@ -19,16 +19,17 @@
2020 */
2121 this.examinerTestFilter = function() {
2222 var filter = $( '#wpTestFilter' ).val(),
 23+ examine = mw.config.get( 'abuseFilterExamine' ),
2324 params = {};
2425 $( this ).injectSpinner( 'filter-check' );
2526
26 - if ( mw.config.get( 'wgExamineType' ) == 'rc' ) {
 27+ if ( examine.type == 'rc' ) {
2728 params = {
28 - rcid: mw.config.get( 'wgExamineId' )
 29+ rcid: examine.id
2930 }
3031 } else {
3132 params = {
32 - logid: mw.config.get( 'wgExamineId' )
 33+ logid: examine.id
3334 }
3435 }
3536

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r95572Adds ResourceLoader support to AbuseFilter...johnduhart20:12, 26 August 2011

Status & tagging log