Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4059612
SpecialMobileDiff.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
SpecialMobileDiff.php
View Options
<?php
use
MediaWiki\Html\Html
;
use
MediaWiki\SpecialPage\UnlistedSpecialPage
;
/**
* Show the difference between two revisions of a page
*/
class
SpecialMobileDiff
extends
UnlistedSpecialPage
{
public
function
__construct
()
{
parent
::
__construct
(
'MobileDiff'
);
}
/**
* Get the URL for Desktop version of difference view
* @param string|null $subPage URL of mobile diff page
* @return string|null Url to mobile diff page
*/
public
function
getDesktopUrl
(
$subPage
)
{
if
(
$subPage
===
null
)
{
return
null
;
}
$parts
=
explode
(
'...'
,
$subPage
);
if
(
count
(
$parts
)
>
1
)
{
$params
=
[
'diff'
=>
$parts
[
1
],
'oldid'
=>
$parts
[
0
]
];
}
else
{
$params
=
[
'diff'
=>
$parts
[
0
]
];
}
if
(
$this
->
getRequest
()->
getVal
(
'unhide'
)
)
{
$params
[
'unhide'
]
=
1
;
}
return
wfAppendQuery
(
wfScript
(),
$params
);
}
/**
* @inheritDoc
*/
public
function
execute
(
$subPage
)
{
$out
=
$this
->
getOutput
();
if
(
!
$subPage
)
{
$out
->
setStatusCode
(
404
);
$out
->
addHTML
(
Html
::
errorBox
(
$out
->
msg
(
'mobile-frontend-generic-404-title'
)->
parse
(),
$out
->
msg
(
'mobile-frontend-generic-404-desc'
)->
text
()
)
);
return
;
}
$out
->
redirect
(
$this
->
getDesktopUrl
(
$subPage
),
'301'
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 16 2026, 05:41 (12 w, 19 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
93/38/e139e533ab4cd766b57f72ac98ea
Default Alt Text
SpecialMobileDiff.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment