Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P8361
SpecialMobileHistory-redirect.php
Active
Public
Actions
Authored by
Krinkle
on Apr 6 2019, 12:47 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F28590716: raw.txt
Apr 6 2019, 12:47 AM
2019-04-06 00:47:33 (UTC+0)
Subscribers
Jdlrobson
<?php
/**
* Compatibility redirect from "Special:History/#" to "index.php?title=#&action=history".
* This used to be a custom version (T216420).
* @ingroup SpecialPage
*/
class
SpecialMobileHistory
extends
RedirectSpecialPage
{
// Pass the paging offset along (MW timestamp format).
protected
$mAllowedRedirectParams
=
[
'offset'
];
public
function
__construct
()
{
parent
::
__construct
(
'History'
);
}
/** @param string|null $subpage */
public
function
execute
(
$subpage
)
{
$query
=
array_merge
(
[
// The receiver (index.php) decides the default title,
// when $title is null (omitted by wfAppendQuery).
'title'
=>
$title
,
'action'
=>
'history'
,
],
parent
::
getRedirectQuery
()
?:
[]
);
$url
=
wfAppendQuery
(
wfScript
(
'index'
),
$query
);
$this
->
getOutput
()->
redirect
(
$url
);
}
/** @return bool */
public
function
getRedirect
(
$subpage
)
{
return
true
;
}
}
Event Timeline
Krinkle
created this paste.
Apr 6 2019, 12:47 AM
2019-04-06 00:47:33 (UTC+0)
Log In to Comment