MediaWiki 1.40.4
SpecialMylog.php
Go to the documentation of this file.
1<?php
23
30 public function __construct() {
31 parent::__construct( 'Mylog' );
32 $this->mAllowedRedirectParams = [ 'type', 'subtype', 'page', 'pattern',
33 'tagfilter', 'tagInvert', 'offset', 'dir', 'offender',
34 'year', 'month', 'day' ];
35 }
36
41 public function getRedirect( $subpage ) {
42 if ( $subpage === null || $subpage === '' ) {
43 return SpecialPage::getSafeTitleFor( 'Log', $this->getUser()->getName() );
44 }
45 return SpecialPage::getSafeTitleFor( 'Log', $subpage . '/' . $this->getUser()->getName() );
46 }
47
53 public function personallyIdentifiableTarget() {
54 return true;
55 }
56
62 public function getSubpagesForPrefixSearch() {
63 $subpages = LogPage::validTypes();
64 $subpages[] = 'all';
65 sort( $subpages );
66 return $subpages;
67 }
68}
Represents a title within MediaWiki.
Definition Title.php:82
Shortcut to construct a special page alias.
Special page pointing to current user's Special:Log.
getRedirect( $subpage)
getSubpagesForPrefixSearch()
Return an array of subpages that this special page will accept.
personallyIdentifiableTarget()
Target identifies a specific User.
getName()
Get the name of this Special Page.
static getSafeTitleFor( $name, $subpage=false)
Get a localised Title object for a page name with a possibly unvalidated subpage.
getUser()
Shortcut to get the User executing this instance.