r48009 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48008‎ | r48009 | r48010 >
Date:02:04, 4 March 2009
Author:werdna
Status:ok
Tags:
Comment:
(bug 17674) Add minor_edit variable to AbuseFilter
Modified paths:
  • /trunk/extensions/AbuseFilter/AbuseFilter.class.php (modified) (history)
  • /trunk/extensions/AbuseFilter/AbuseFilter.hooks.php (modified) (history)
  • /trunk/extensions/AbuseFilter/AbuseFilter.i18n.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AbuseFilter/AbuseFilter.class.php
@@ -99,6 +99,7 @@
100100 'old_text' => 'old-text-stripped',
101101 'old_html' => 'old-html',
102102 'old_links' => 'old-links',
 103+ 'minor_edit' => 'minor-edit',
103104 ),
104105 );
105106
@@ -1108,6 +1109,7 @@
11091110 $vars->addHolder( self::generateTitleVars( $title, 'ARTICLE' ) );
11101111 $vars->setVar( 'ACTION', 'edit' );
11111112 $vars->setVar( 'SUMMARY', $row->rc_comment );
 1113+ $vars->setVar( 'minor_edit', $row->rc_minor );
11121114
11131115
11141116 $vars->setLazyLoadVar( 'new_wikitext', 'revision-text-by-id',
Index: trunk/extensions/AbuseFilter/AbuseFilter.i18n.php
@@ -276,6 +276,7 @@
277277 'abusefilter-edit-builder-vars-old-text-stripped' => 'Old page text, stripped of any markup',
278278 'abusefilter-edit-builder-vars-old-links' => 'Links in the page, before the edit',
279279 'abusefilter-edit-builder-vars-old-html' => 'Old page wikitext, parsed into HTML',
 280+ 'abusefilter-edit-builder-vars-minor-edit' => 'Whether or not the edit is marked as minor',
280281
281282 // Filter history
282283 'abusefilter-filter-log' => 'Recent filter changes',
Index: trunk/extensions/AbuseFilter/AbuseFilter.hooks.php
@@ -21,6 +21,7 @@
2222 $vars->addHolder( AbuseFilter::generateTitleVars( $editor->mTitle , 'ARTICLE' ) );
2323 $vars->setVar( 'ACTION', 'edit' );
2424 $vars->setVar( 'SUMMARY', $summary );
 25+ $vars->setVar( 'minor_edit', $editor->minoredit );
2526
2627 $vars->setLazyLoadVar( 'old_wikitext', 'revision-text-by-timestamp',
2728 array(

Status & tagging log