Switch some HTMLForms in special pages to OOUI
[lhc/web/wiklou.git] / includes / specials / SpecialPermanentLink.php
index 6c2ffe9..53789c0 100644 (file)
  * @ingroup SpecialPage
  */
 class SpecialPermanentLink extends RedirectSpecialPage {
-       function __construct() {
+       public function __construct() {
                parent::__construct( 'PermanentLink' );
                $this->mAllowedRedirectParams = array();
        }
 
-       function getRedirect( $subpage ) {
+       /**
+        * @param string|null $subpage
+        * @return Title|bool
+        */
+       public function getRedirect( $subpage ) {
                $subpage = intval( $subpage );
                if ( $subpage === 0 ) {
                        # throw an error page when no subpage was given
                        throw new ErrorPageError( 'nopagetitle', 'nopagetext' );
                }
                $this->mAddedRedirectParams['oldid'] = $subpage;
+
                return true;
        }
 }