Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4073407
SpecialNoticeTemplate.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
795 B
Referenced Files
None
Subscribers
None
SpecialNoticeTemplate.php
View Options
<?php
use
MediaWiki\SpecialPage\SpecialPage
;
class
SpecialNoticeTemplate
extends
CentralNotice
{
public
function
__construct
()
{
// Register special page
SpecialPage
::
__construct
(
'NoticeTemplate'
);
}
/**
* Handle different types of page requests
* @param string|null $sub
*/
public
function
execute
(
$sub
)
{
if
(
$sub
==
'view'
)
{
// Trying to view a banner -- so redirect to edit form
$banner
=
$this
->
getRequest
()->
getText
(
'template'
);
$title
=
SpecialPage
::
getTitleFor
(
'CentralNoticeBanners'
,
"edit/$banner"
);
}
else
{
// don't know where they were trying to go, redirect them to the new list form
$title
=
SpecialPage
::
getTitleFor
(
'CentralNoticeBanners'
);
}
$this
->
getOutput
()->
redirect
(
$title
->
getFullUrlForRedirect
(),
301
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 17 2026, 11:02 (11 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
8d/51/c2aae59b703caebf66255b8f83cb
Default Alt Text
SpecialNoticeTemplate.php (795 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment