Magic word __STATICREDIRECT__ to suppress the redirect fixer. For periodically-archived pages like [[WP:GO]].
This commit is contained in:
parent
c85a7e6c83
commit
a9415c3278
3 changed files with 9 additions and 0 deletions
|
|
@ -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 ) {
|
||||
|
|
|
|||
|
|
@ -157,6 +157,7 @@ class MagicWord {
|
|||
'hiddencat',
|
||||
'index',
|
||||
'noindex',
|
||||
'staticredirect',
|
||||
);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -342,6 +342,7 @@ $magicWords = array(
|
|||
'pagesize' => array( 1, 'PAGESIZE' ),
|
||||
'index' => array( 1, '__INDEX__' ),
|
||||
'noindex' => array( 1, '__NOINDEX__' ),
|
||||
'staticredirect' => array( 1, '__STATICREDIRECT__' ),
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue