29 $title->isSpecial(
'Userlogin' )
30 || $title->isSpecial(
'CreateAccount' )
31 || $title->isSpecial(
'Userlogout' )
34 'uselang' => $request->getVal(
'uselang' ),
35 'variant' => $request->getVal(
'variant' ),
36 'display' => $request->getVal(
'display' ),
37 'returnto' => $request->getVal(
'returnto' ),
38 'returntoquery' => $request->getVal(
'returntoquery' ),
39 'returntoanchor' => $request->getVal(
'returntoanchor' ),
42 ->onAuthPreserveQueryParams( $params, [
'request' => $request,
'reset' =>
true ] );
43 return array_filter( $params,
static fn ( $val ) => $val !==
null );
46 # Due to T34276, if a user does not have read permissions,
47 # $this->getTitle() will just give Special:Badtitle, which is
48 # not especially useful as a returnto parameter. Use the title
49 # from the request instead, if there was one.
50 if ( $authority->isAllowed(
'read' ) ) {
53 $page = Title::newFromText( $request->getVal(
'title',
'' ) );
57 if ( !$request->wasPosted() ) {
58 $query = $request->getQueryValues();
59 unset( $query[
'title'] );
64 $params[
'returnto'] = $page->getPrefixedText();
84 public static function makeSpecialUrl( $name, $urlaction =
'', $proto =
null ) {
86 if ( $proto ===
null ) {
87 return $title->getLocalURL( $urlaction );
89 return $title->getFullURL( $urlaction,
false, $proto );
101 return $title->getLocalURL( $urlaction );
wfArrayToCgi( $array1, $array2=null, $prefix='')
This function takes one or two arrays as input, and returns a CGI-style string, e....
Parent class for all special pages.
static getSafeTitleFor( $name, $subpage=false)
Get a localised Title object for a page name with a possibly unvalidated subpage.