X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecialpage%2FRedirectSpecialPage.php;h=4e5da9701b7a8a7a5090f1cc22bb4161cea1feaf;hb=3430278e374f8b5baeb4cf7cf802eb19f11b9be8;hp=ea7d7831480282bfd7042989eae78291b8b0a5d2;hpb=e3bd13db0c285f312e31bb1b7271af4628cca80c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specialpage/RedirectSpecialPage.php b/includes/specialpage/RedirectSpecialPage.php index ea7d783148..4e5da9701b 100644 --- a/includes/specialpage/RedirectSpecialPage.php +++ b/includes/specialpage/RedirectSpecialPage.php @@ -41,7 +41,7 @@ abstract class RedirectSpecialPage extends UnlistedSpecialPage { $query = $this->getRedirectQuery(); // Redirect to a page title with possible query parameters if ( $redirect instanceof Title ) { - $url = $redirect->getFullURL( $query ); + $url = $redirect->getFullUrlForRedirect( $query ); $this->getOutput()->redirect( $url ); return $redirect; @@ -52,8 +52,7 @@ abstract class RedirectSpecialPage extends UnlistedSpecialPage { return $redirect; } else { - $class = get_class( $this ); - throw new MWException( "RedirectSpecialPage $class doesn't redirect!" ); + $this->showNoRedirectPage(); } } @@ -106,6 +105,11 @@ abstract class RedirectSpecialPage extends UnlistedSpecialPage { public function personallyIdentifiableTarget() { return false; } + + protected function showNoRedirectPage() { + $class = static::class; + throw new MWException( "RedirectSpecialPage $class doesn't redirect!" ); + } } /**