From 374c81791af5df3a280211c4747f02399116b2c8 Mon Sep 17 00:00:00 2001 From: Fomafix Date: Thu, 7 Jun 2018 10:07:15 +0200 Subject: [PATCH] WebInstaller::getDocUrl: Use getUrl to generate the URL This changes ensures to generate the same URLs on doclinks like in the navigation bar. mw-config/?page=Welcome has as "Restart installation" the URL /.../mw-config/?page=Restart&lastPage=Language and as "a copy of the GNU General Public License" the URL before this change /.../mw-config/index.php?page=Copying&lastPage=Welcome after this change /.../mw-config/?page=Copying&lastPage=Welcome Change-Id: Ide5cb52d71363c3a54e1b6ac48c272e1de823322 --- includes/installer/WebInstaller.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index 8fb980791e..d754a37f27 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -1121,13 +1121,13 @@ class WebInstaller extends Installer { * @return string */ protected function getDocUrl( $page ) { - $url = "{$_SERVER['PHP_SELF']}?page=" . urlencode( $page ); + $query = [ 'page' => $page ]; if ( in_array( $this->currentPageName, $this->pageSequence ) ) { - $url .= '&lastPage=' . urlencode( $this->currentPageName ); + $query['lastPage'] = $this->currentPageName; } - return $url; + return $this->getUrl( $query ); } /** -- 2.20.1