Mailing List Archive

SVN: [38111] trunk/phase3
Revision: 38111
Author: tstarling
Date: 2008-07-27 21:49:58 +0000 (Sun, 27 Jul 2008)

Log Message:
-----------
Magic word __STATICREDIRECT__ to suppress the redirect fixer. For periodically-archived pages like [[WP:GO]].

Modified Paths:
--------------
trunk/phase3/includes/DoubleRedirectJob.php
trunk/phase3/includes/MagicWord.php
trunk/phase3/languages/messages/MessagesEn.php

Modified: trunk/phase3/includes/DoubleRedirectJob.php
===================================================================
--- trunk/phase3/includes/DoubleRedirectJob.php 2008-07-27 21:31:11 UTC (rev 38110)
+++ trunk/phase3/includes/DoubleRedirectJob.php 2008-07-27 21:49:58 UTC (rev 38111)
@@ -66,6 +66,13 @@
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 ) {

Modified: trunk/phase3/includes/MagicWord.php
===================================================================
--- trunk/phase3/includes/MagicWord.php 2008-07-27 21:31:11 UTC (rev 38110)
+++ trunk/phase3/includes/MagicWord.php 2008-07-27 21:49:58 UTC (rev 38111)
@@ -157,6 +157,7 @@
'hiddencat',
'index',
'noindex',
+ 'staticredirect',
);



Modified: trunk/phase3/languages/messages/MessagesEn.php
===================================================================
--- trunk/phase3/languages/messages/MessagesEn.php 2008-07-27 21:31:11 UTC (rev 38110)
+++ trunk/phase3/languages/messages/MessagesEn.php 2008-07-27 21:49:58 UTC (rev 38111)
@@ -342,6 +342,7 @@
'pagesize' => array( 1, 'PAGESIZE' ),
'index' => array( 1, '__INDEX__' ),
'noindex' => array( 1, '__NOINDEX__' ),
+ 'staticredirect' => array( 1, '__STATICREDIRECT__' ),
);

/**



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs