diff --git a/includes/DoubleRedirectJob.php b/includes/DoubleRedirectJob.php index dd6549ce17d..889beecfe73 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 ca2a1133070..cabd3942997 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 1b692ac01e3..c75bec0a00a 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__' ), ); /**