MediaWiki  REL1_24
SpecialPermanentLink.php
Go to the documentation of this file.
00001 <?php
00029 class SpecialPermanentLink extends RedirectSpecialPage {
00030     function __construct() {
00031         parent::__construct( 'PermanentLink' );
00032         $this->mAllowedRedirectParams = array();
00033     }
00034 
00035     function getRedirect( $subpage ) {
00036         $subpage = intval( $subpage );
00037         if ( $subpage === 0 ) {
00038             # throw an error page when no subpage was given
00039             throw new ErrorPageError( 'nopagetitle', 'nopagetext' );
00040         }
00041         $this->mAddedRedirectParams['oldid'] = $subpage;
00042 
00043         return true;
00044     }
00045 }