From: Fomafix Date: Thu, 7 Jun 2018 08:07:15 +0000 (+0200) Subject: WebInstaller::getDocUrl: Use getUrl to generate the URL X-Git-Tag: 1.34.0-rc.0~5125^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=374c81791af5df3a280211c4747f02399116b2c8;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 ); } /**