Switch some HTMLForms in special pages to OOUI
[lhc/web/wiklou.git] / includes / specials / SpecialDiff.php
index 799e526..8b5d31a 100644 (file)
  * @since 1.23
  */
 class SpecialDiff extends RedirectSpecialPage {
-       function __construct() {
+       public function __construct() {
                parent::__construct( 'Diff' );
                $this->mAllowedRedirectParams = array();
        }
 
-       function getRedirect( $subpage ) {
+       /**
+        * @param string|null $subpage
+        * @return Title|bool
+        */
+       public function getRedirect( $subpage ) {
                $parts = explode( '/', $subpage );
 
                // Try to parse the values given, generating somewhat pretty URLs if possible
@@ -53,7 +57,7 @@ class SpecialDiff extends RedirectSpecialPage {
                        $this->mAddedRedirectParams['diff'] = $parts[1];
                } else {
                        // Wrong number of parameters, bail out
-                       $this->getOutput()->addHelpLink( 'Help:Diff' );
+                       $this->addHelpLink( 'Help:Diff' );
                        throw new ErrorPageError( 'nopagetitle', 'nopagetext' );
                }