MediaWiki
REL1_41
SpecialMylog.php
Go to the documentation of this file.
1
<?php
22
namespace
MediaWiki\Specials\Redirects
;
23
24
use
LogPage
;
25
use
MediaWiki\SpecialPage\RedirectSpecialPage
;
26
use
MediaWiki\SpecialPage\SpecialPage
;
27
use
MediaWiki\Title\Title
;
28
34
class
SpecialMylog
extends
RedirectSpecialPage
{
35
public
function
__construct
() {
36
parent::__construct(
'Mylog'
);
37
$this->mAllowedRedirectParams = [
'type'
,
'subtype'
,
'page'
,
'pattern'
,
38
'tagfilter'
,
'tagInvert'
,
'offset'
,
'dir'
,
'offender'
,
39
'year'
,
'month'
,
'day'
];
40
}
41
46
public
function
getRedirect
( $subpage ) {
47
if
( $subpage ===
null
|| $subpage ===
''
) {
48
return
SpecialPage::getSafeTitleFor
(
'Log'
, $this->
getUser
()->
getName
() );
49
}
50
return
SpecialPage::getSafeTitleFor
(
'Log'
, $subpage .
'/'
. $this->
getUser
()->
getName
() );
51
}
52
58
public
function
personallyIdentifiableTarget
() {
59
return
true
;
60
}
61
67
public
function
getSubpagesForPrefixSearch
() {
68
$subpages = LogPage::validTypes();
69
$subpages[] =
'all'
;
70
sort( $subpages );
71
return
$subpages;
72
}
73
}
74
79
class_alias( SpecialMylog::class,
'SpecialMylog'
);
LogPage
Class to simplify the use of log pages.
Definition
LogPage.php:43
MediaWiki\SpecialPage\RedirectSpecialPage
Shortcut to construct a special page alias.
Definition
RedirectSpecialPage.php:36
MediaWiki\SpecialPage\SpecialPage
Parent class for all special pages.
Definition
SpecialPage.php:65
MediaWiki\SpecialPage\SpecialPage\getUser
getUser()
Shortcut to get the User executing this instance.
Definition
SpecialPage.php:901
MediaWiki\SpecialPage\SpecialPage\getSafeTitleFor
static getSafeTitleFor( $name, $subpage=false)
Get a localised Title object for a page name with a possibly unvalidated subpage.
Definition
SpecialPage.php:182
MediaWiki\SpecialPage\SpecialPage\getName
getName()
Get the name of this Special Page.
Definition
SpecialPage.php:225
MediaWiki\Specials\Redirects\SpecialMylog
Special page pointing to current user's Special:Log.
Definition
SpecialMylog.php:34
MediaWiki\Specials\Redirects\SpecialMylog\getSubpagesForPrefixSearch
getSubpagesForPrefixSearch()
Return an array of subpages that this special page will accept.
Definition
SpecialMylog.php:67
MediaWiki\Specials\Redirects\SpecialMylog\getRedirect
getRedirect( $subpage)
Definition
SpecialMylog.php:46
MediaWiki\Specials\Redirects\SpecialMylog\personallyIdentifiableTarget
personallyIdentifiableTarget()
Target identifies a specific User.
Definition
SpecialMylog.php:58
MediaWiki\Specials\Redirects\SpecialMylog\__construct
__construct()
Definition
SpecialMylog.php:35
MediaWiki\Title\Title
Represents a title within MediaWiki.
Definition
Title.php:76
MediaWiki\Specials\Redirects
Definition
SpecialAllMyUploads.php:27
includes
specials
redirects
SpecialMylog.php
Generated on Sat Nov 23 2024 08:25:04 for MediaWiki by
1.10.0