Magic word __STATICREDIRECT__ to suppress the redirect fixer. For periodically-archiv...
authorTim Starling <tstarling@users.mediawiki.org>
Sun, 27 Jul 2008 21:49:58 +0000 (21:49 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sun, 27 Jul 2008 21:49:58 +0000 (21:49 +0000)
includes/DoubleRedirectJob.php
includes/MagicWord.php
languages/messages/MessagesEn.php

index dd6549c..889beec 100644 (file)
@@ -66,6 +66,13 @@ class DoubleRedirectJob extends Job {
                        return true;
                }
 
+               # Check for a suppression tag (used e.g. in periodically archived discussions)
+               $mw = MagicWord::get( 'staticredirect' );
+               if ( $mw->match( $text ) ) {
+                       wfDebug( __METHOD__.": skipping: suppressed with __STATICREDIRECT__\n" );
+                       return true;
+               }
+
                # Find the current final destination
                $newTitle = self::getFinalDestination( $this->redirTitle );
                if ( !$newTitle ) {
index ca2a113..cabd394 100644 (file)
@@ -157,6 +157,7 @@ class MagicWord {
                'hiddencat',
                'index',
                'noindex',
+               'staticredirect',
        );
 
 
index 1b692ac..c75bec0 100644 (file)
@@ -342,6 +342,7 @@ $magicWords = array(
        'pagesize'               => array( 1,    'PAGESIZE'               ),
        'index'                  => array( 1,    '__INDEX__'              ),
        'noindex'                => array( 1,    '__NOINDEX__'            ),
+       'staticredirect'         => array( 1,    '__STATICREDIRECT__'     ),
 );
 
 /**