Abuse Filter changes designed for testing filters against real data:
authorAndrew Garrett <werdna@users.mediawiki.org>
Thu, 29 Jan 2009 22:44:31 +0000 (22:44 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Thu, 29 Jan 2009 22:44:31 +0000 (22:44 +0000)
* Add searching and filtering functionality to the existing 'test' interface.
* Add an 'examine' interface designed for testing filters against a previous change, selectable through the search interface in either the 'test' or the 'examine' view.
* Minor enabling change in ChangesList core, to allow subclassing.

includes/ChangesList.php

index 629211e..1c6f4bd 100644 (file)
@@ -347,6 +347,10 @@ class ChangesList {
                $classes = array_merge( $classes, $newClasses );
                $s .= ' ' . $tagSummary;
        }
+
+       protected function insertExtra( &$s, &$rc, &$classes ) {
+               ## Empty, used for subclassers to add anything special.
+       }
 }
 
 
@@ -408,6 +412,9 @@ class OldChangesList extends ChangesList {
                $this->insertTags( $s, $rc, $classes );
                # Rollback
                $this->insertRollback( $s, $rc );
+               # For subclasses
+               $this->insertExtra( $s, $rc, $classes );
+               
                # Mark revision as deleted if so
                if( !$rc->mAttribs['rc_log_type'] && $this->isDeleted($rc,Revision::DELETED_TEXT) ) {
                   $s .= ' <tt>' . wfMsgHtml( 'deletedrev' ) . '</tt>';