Page MenuHomeWickedGov Phorge

SpecialNoticeTemplate.php
No OneTemporary

Size
795 B
Referenced Files
None
Subscribers
None

SpecialNoticeTemplate.php

<?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

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)

Event Timeline