23 if ( is_array( $class ) ) {
26 $class .=
' ' . $newClass;
27 $class = trim( $class );
47 $title->isSpecial(
'Userlogin' )
48 || $title->isSpecial(
'CreateAccount' )
49 || $title->isSpecial(
'Userlogout' )
52 'uselang' => $request->getVal(
'uselang' ),
53 'variant' => $request->getVal(
'variant' ),
54 'display' => $request->getVal(
'display' ),
55 'returnto' => $request->getVal(
'returnto' ),
56 'returntoquery' => $request->getVal(
'returntoquery' ),
57 'returntoanchor' => $request->getVal(
'returntoanchor' ),
60 ->onAuthPreserveQueryParams(
$params, [
'reset' =>
true ] );
61 return array_filter(
$params, fn ( $val ) => $val !==
null );
64 # Due to T34276, if a user does not have read permissions,
65 # $this->getTitle() will just give Special:Badtitle, which is
66 # not especially useful as a returnto parameter. Use the title
67 # from the request instead, if there was one.
68 if ( $authority->isAllowed(
'read' ) ) {
71 $page = Title::newFromText( $request->getVal(
'title',
'' ) );
75 if ( !$request->wasPosted() ) {
76 $query = $request->getQueryValues();
77 unset( $query[
'title'] );
82 $params[
'returnto'] = $page->getPrefixedText();
104 if ( $proto ===
null ) {
105 return $title->getLocalURL( $urlaction );
107 return $title->getFullURL( $urlaction,
false, $proto );
119 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....
array $params
The job parameters.
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.