MediaWiki REL1_31
SpecialMyRedirectPages.php
Go to the documentation of this file.
1<?php
33 public function __construct() {
34 parent::__construct( 'Mypage' );
35 }
36
41 public function getRedirect( $subpage ) {
42 if ( $subpage === null || $subpage === '' ) {
43 return Title::makeTitle( NS_USER, $this->getUser()->getName() );
44 }
45
46 return Title::makeTitle( NS_USER, $this->getUser()->getName() . '/' . $subpage );
47 }
48
55 public function personallyIdentifiableTarget() {
56 return true;
57 }
58}
59
66 public function __construct() {
67 parent::__construct( 'Mytalk' );
68 }
69
74 public function getRedirect( $subpage ) {
75 if ( $subpage === null || $subpage === '' ) {
76 return Title::makeTitle( NS_USER_TALK, $this->getUser()->getName() );
77 }
78
79 return Title::makeTitle( NS_USER_TALK, $this->getUser()->getName() . '/' . $subpage );
80 }
81
88 public function personallyIdentifiableTarget() {
89 return true;
90 }
91}
92
99 public function __construct() {
100 parent::__construct( 'Mycontributions' );
101 $this->mAllowedRedirectParams = [ 'limit', 'namespace', 'tagfilter',
102 'offset', 'dir', 'year', 'month', 'feed', 'deletedOnly',
103 'nsInvert', 'associated', 'newOnly', 'topOnly' ];
104 }
105
110 public function getRedirect( $subpage ) {
111 return SpecialPage::getTitleFor( 'Contributions', $this->getUser()->getName() );
112 }
113
121 return true;
122 }
123}
124
131 public function __construct() {
132 parent::__construct( 'Myuploads' );
133 $this->mAllowedRedirectParams = [ 'limit', 'ilshowall', 'ilsearch' ];
134 }
135
140 public function getRedirect( $subpage ) {
141 return SpecialPage::getTitleFor( 'Listfiles', $this->getUser()->getName() );
142 }
143
151 return true;
152 }
153}
154
161 public function __construct() {
162 parent::__construct( 'AllMyUploads' );
163 $this->mAllowedRedirectParams = [ 'limit', 'ilsearch' ];
164 }
165
170 public function getRedirect( $subpage ) {
171 $this->mAddedRedirectParams['ilshowall'] = 1;
172
173 return SpecialPage::getTitleFor( 'Listfiles', $this->getUser()->getName() );
174 }
175
183 return true;
184 }
185}
Superclass for any RedirectSpecialPage which redirects the user to a particular article (as opposed t...
Shortcut to construct a special page alias.
Special page pointing to current user's uploaded files (including old versions).
personallyIdentifiableTarget()
Target identifies a specific User.
Special page pointing to current user's contributions.
personallyIdentifiableTarget()
Target identifies a specific User.
Special page pointing to current user's user page.
personallyIdentifiableTarget()
Target identifies a specific User.
Special page pointing to current user's talk page.
personallyIdentifiableTarget()
Target identifies a specific User.
Special page pointing to current user's uploaded files.
personallyIdentifiableTarget()
Target identifies a specific User.
getName()
Get the name of this Special Page.
getUser()
Shortcut to get the User executing this instance.
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name If you don't need a full Title object,...
const NS_USER_TALK
Definition Defines.php:77