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
* @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 );
}
/**