29 $title->isSpecial(
'Userlogin' )
30 || $title->isSpecial(
'CreateAccount' )
31 || $title->isSpecial(
'Userlogout' )
33 $loginHelper =
new LoginHelper( RequestContext::getMain() );
34 return $loginHelper->getPreservedParams( [
'request' =>
$request,
'reset' =>
true ] );
37 # Due to T34276, if a user does not have read permissions,
38 # $this->getTitle() will just give Special:Badtitle, which is
39 # not especially useful as a returnto parameter. Use the title
40 # from the request instead, if there was one.
41 if ( $authority->isAllowed(
'read' ) ) {
44 $page = Title::newFromText(
$request->getVal(
'title',
'' ) );
50 unset( $query[
'title'] );
55 $params[
'returnto'] = $page->getPrefixedText();
75 public static function makeSpecialUrl( $name, $urlaction =
'', $proto =
null ) {
77 if ( $proto ===
null ) {
78 return $title->getLocalURL( $urlaction );
80 return $title->getFullURL( $urlaction,
false, $proto );
92 return $title->getLocalURL( $urlaction );
97class_alias( SkinComponentUtils::class,
'MediaWiki\\Skin\\SkinComponentUtils' );
wfArrayToCgi( $array1, $array2=null, $prefix='')
This function takes one or two arrays as input, and returns a CGI-style string, e....
Group all the pieces relevant to the context of a request into one instance.
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.