diff options
author | jenkins-bot <jenkins-bot@gerrit.wikimedia.org> | 2022-09-02 10:22:47 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@wikimedia.org> | 2022-09-02 10:22:47 +0000 |
commit | b58472be00a3456a7b91617351158b457e461e99 (patch) | |
tree | f362693f0f486081ab7770aa6708f16c46bf4414 /includes/OutputPage.php | |
parent | a243853c4dcd28596fbb8e13150dac4f8dc47602 (diff) | |
parent | 28989561010863d89deee924e5a5f60acf687f6b (diff) | |
download | mediawikicore-b58472be00a3456a7b91617351158b457e461e99.tar.gz mediawikicore-b58472be00a3456a7b91617351158b457e461e99.zip |
Merge "Allow customizing OutputPage::showErrorPage() return URL"
Diffstat (limited to 'includes/OutputPage.php')
-rw-r--r-- | includes/OutputPage.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/includes/OutputPage.php b/includes/OutputPage.php index f5d371bee825..0a4f60906fe6 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2932,8 +2932,14 @@ class OutputPage extends ContextSource { * @param string|Message $title Message key (string) for page title, or a Message object * @param string|Message $msg Message key (string) for page text, or a Message object * @param array $params Message parameters; ignored if $msg is a Message object + * @param PageReference|LinkTarget|string|null $returnto Page to show a return link to; + * defaults to the 'returnto' URL parameter + * @param string|null $returntoquery Query string for the return to link; + * defaults to the 'returntoquery' URL parameter */ - public function showErrorPage( $title, $msg, $params = [] ) { + public function showErrorPage( + $title, $msg, $params = [], $returnto = null, $returntoquery = null + ) { if ( !$title instanceof Message ) { $title = $this->msg( $title ); } @@ -2951,7 +2957,7 @@ class OutputPage extends ContextSource { $this->addWikiMsgArray( $msg, $params ); } - $this->returnToMain(); + $this->returnToMain( null, $returnto, $returntoquery ); } /** |