21 if ( is_array( $class ) ) {
24 $class .=
' ' . $newClass;
25 $class = trim( $class );
40 # Due to T34276, if a user does not have read permissions,
41 # $this->getTitle() will just give Special:Badtitle, which is
42 # not especially useful as a returnto parameter. Use the title
43 # from the request instead, if there was one.
44 if ( $authority->isAllowed(
'read' ) ) {
47 $page = Title::newFromText( $request->getVal(
'title',
'' ) );
49 $page = $request->getVal(
'returnto', $page );
52 if ( !$request->wasPosted() ) {
53 $query = $request->getValues();
54 unset( $query[
'title'] );
55 unset( $query[
'returnto'] );
56 unset( $query[
'returntoquery'] );
62 if ( strval( $page ) !==
'' ) {
63 $returnto[
'returnto'] = $page;
64 $query = $request->getVal(
'returntoquery', $thisquery );
68 $returnto[
'returntoquery'] = $query;
86 public static function makeSpecialUrl( $name, $urlaction =
'', $proto =
null ) {
88 if ( $proto ===
null ) {
89 return $title->getLocalURL( $urlaction );
91 return $title->getFullURL( $urlaction,
false, $proto );
103 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....
wfCgiToArray( $query)
This is the logical opposite of wfArrayToCgi(): it accepts a query string as its argument and returns...
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.