Add Content::matchMagicWord
[lhc/web/wiklou.git] / includes / job / DoubleRedirectJob.php
index 6a81b27..7acc4f2 100644 (file)
@@ -102,9 +102,8 @@ class DoubleRedirectJob extends Job {
                }
 
                # Check for a suppression tag (used e.g. in periodically archived discussions)
-               $text = ContentHandler::getContentText( $content );
                $mw = MagicWord::get( 'staticredirect' );
-               if ( $mw->match( $text ) ) { #FIXME: add support for this to ContentHandler/Content
+               if ( $content->matchMagicWord( $mw ) ) {
                        wfDebug( __METHOD__.": skipping: suppressed with __STATICREDIRECT__\n" );
                        return true;
                }
@@ -125,6 +124,8 @@ class DoubleRedirectJob extends Job {
                $newTitle = Title::makeTitle( $newTitle->getNamespace(), $newTitle->getDBkey(),
                        $currentDest->getFragment() );
 
+               $text = ContentHandler::getContentText( $content ); #FIXME: get rid of this!
+
                # Fix the text
                # Remember that redirect pages can have categories, templates, etc.,
                # so the regex has to be fairly general