From: Tim Starling Date: Sun, 27 Jul 2008 21:49:58 +0000 (+0000) Subject: Magic word __STATICREDIRECT__ to suppress the redirect fixer. For periodically-archiv... X-Git-Tag: 1.31.0-rc.0~46343 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=a9415c3278542c0b63c90aeb82e33a8436d33c7e;p=lhc%2Fweb%2Fwiklou.git Magic word __STATICREDIRECT__ to suppress the redirect fixer. For periodically-archived pages like [[WP:GO]]. --- diff --git a/includes/DoubleRedirectJob.php b/includes/DoubleRedirectJob.php index dd6549ce17..889beecfe7 100644 --- a/includes/DoubleRedirectJob.php +++ b/includes/DoubleRedirectJob.php @@ -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 ) { diff --git a/includes/MagicWord.php b/includes/MagicWord.php index ca2a113307..cabd394299 100644 --- a/includes/MagicWord.php +++ b/includes/MagicWord.php @@ -157,6 +157,7 @@ class MagicWord { 'hiddencat', 'index', 'noindex', + 'staticredirect', ); diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 1b692ac01e..c75bec0a00 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -342,6 +342,7 @@ $magicWords = array( 'pagesize' => array( 1, 'PAGESIZE' ), 'index' => array( 1, '__INDEX__' ), 'noindex' => array( 1, '__NOINDEX__' ), + 'staticredirect' => array( 1, '__STATICREDIRECT__' ), ); /**