r38111 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38110‎ | r38111 | r38112 >
Date:21:49, 27 July 2008
Author:tstarling
Status:old
Tags:
Comment:
Magic word __STATICREDIRECT__ to suppress the redirect fixer. For periodically-archived pages like [[WP:GO]].
Modified paths:
  • /trunk/phase3/includes/DoubleRedirectJob.php (modified) (history)
  • /trunk/phase3/includes/MagicWord.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/DoubleRedirectJob.php
@@ -66,6 +66,13 @@
6767 return true;
6868 }
6969
 70+ # Check for a suppression tag (used e.g. in periodically archived discussions)
 71+ $mw = MagicWord::get( 'staticredirect' );
 72+ if ( $mw->match( $text ) ) {
 73+ wfDebug( __METHOD__.": skipping: suppressed with __STATICREDIRECT__\n" );
 74+ return true;
 75+ }
 76+
7077 # Find the current final destination
7178 $newTitle = self::getFinalDestination( $this->redirTitle );
7279 if ( !$newTitle ) {
Index: trunk/phase3/includes/MagicWord.php
@@ -157,6 +157,7 @@
158158 'hiddencat',
159159 'index',
160160 'noindex',
 161+ 'staticredirect',
161162 );
162163
163164
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -342,6 +342,7 @@
343343 'pagesize' => array( 1, 'PAGESIZE' ),
344344 'index' => array( 1, '__INDEX__' ),
345345 'noindex' => array( 1, '__NOINDEX__' ),
 346+ 'staticredirect' => array( 1, '__STATICREDIRECT__' ),
346347 );
347348
348349 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r38837Backported the following:...tstarling04:02, 8 August 2008

Status & tagging log