30 parent::__construct(
'DeletedContributions',
'deletedhistory',
54 $out->setPageTitle( $this->
msg(
'deletedcontributions-title' ) );
58 if ( $par !== null ) {
61 $target =
$request->getVal(
'target' );
64 if ( !strlen( $target ) ) {
71 $this->
getConfig()->
get(
'QueryPageDefaultLimit' ) );
80 $this->
getSkin()->setRelevantUser( $userObj );
82 $target = $userObj->getName();
85 $ns =
$request->getVal(
'namespace', null );
86 if ( $ns !== null && $ns !==
'' ) {
87 $options[
'namespace'] = intval( $ns );
95 if ( !$pager->getNumRows() ) {
96 $out->addWikiMsg(
'nocontribs' );
101 # Show a message about replica DB lag, if applicable
102 $lag =
wfGetLB()->safeGetLag( $pager->getDatabase() );
104 $out->showLagWarning( $lag );
108 '<p>' . $pager->getNavigationBar() .
'</p>' .
110 '<p>' . $pager->getNavigationBar() .
'</p>' );
112 # If there were contributions, and it was a valid user or IP, show
113 # the appropriate "footer" message - WHOIS tools, etc.
114 if ( $target !=
'newbies' ) {
116 'sp-contributions-footer-anon' :
117 'sp-contributions-footer';
119 if ( !$this->
msg( $message )->isDisabled() ) {
121 "<div class='mw-contributions-footer'>\n$1\n</div>",
122 [ $message, $target ]
135 if ( $userObj->isAnon() ) {
136 $user = htmlspecialchars( $userObj->getName() );
141 $nt = $userObj->getUserPage();
142 $talk = $nt->getTalkPage();
146 # Link to contributions
149 $this->
msg(
'sp-deletedcontributions-contribs' )->text()
154 unset( $tools[
'deletedcontribs'] );
174 'showIfEmpty' =>
false,
176 'sp-contributions-blocked-notice',
177 $userObj->getName() # Support GENDER
in 'sp-contributions-blocked-notice'
179 'offset' =>
'' # don
't use $this->getRequest() parameter offset
185 return $this->msg( 'contribsub2
' )->rawParams( $user, $links )->params( $userObj->getName() );
193 function getForm( $options ) {
194 $options['title'] = $this->getPageTitle()->getPrefixedText();
195 if ( !isset( $options['target
'] ) ) {
196 $options['target
'] = '';
198 $options['target
'] = str_replace( '_
', ' ', $options['target
'] );
201 if ( !isset( $options['namespace'] ) ) {
202 $options['namespace'] = '';
205 if ( !isset( $options['contribs
'] ) ) {
206 $options['contribs
'] = 'user';
209 if ( $options['contribs
'] == 'newbie
' ) {
210 $options['target
'] = '';
213 $f = Xml::openElement( 'form', [ 'method
' => 'get', 'action
' => wfScript() ] );
215 foreach ( $options as $name => $value ) {
216 if ( in_array( $name, [ 'namespace', 'target
', 'contribs
' ] ) ) {
219 $f .= "\t" . Html::hidden( $name, $value ) . "\n";
222 $this->getOutput()->addModules( 'mediawiki.userSuggest
' );
224 $f .= Xml::openElement( 'fieldset
' );
225 $f .= Xml::element( 'legend
', [], $this->msg( 'sp-contributions-search
' )->text() );
228 [ 'for' => 'target
' ],
229 $this->msg( 'sp-contributions-username
' )->parse()
239 'mw-autocomplete-
user', // used by mediawiki.userSuggest
241 ] + ( $options['target
'] ? [] : [ 'autofocus
' ] )
243 $f .= Html::namespaceSelector(
245 'selected
' => $options['namespace'],
247 'label
' => $this->msg( 'namespace' )->text()
250 'name' => 'namespace',
252 'class' => 'namespaceselector
',
255 $f .= Xml::submitButton( $this->msg( 'sp-contributions-submit
' )->text() );
256 $f .= Xml::closeElement( 'fieldset
' );
257 $f .= Xml::closeElement( 'form' );
270 public function prefixSearchSubpages( $search, $limit, $offset ) {
271 $user = User::newFromName( $search );
273 // No prefix suggestion for invalid user
276 // Autocomplete subpage as user list - public to allow caching
277 return UserNamePrefixSearch::search( 'public', $search, $limit, $offset );
280 protected function getGroupName() {
static newFromName($name, $validate= 'valid')
Static factory method for creation from username.
null means default in associative array form
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that probably a stub it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output $out
getContext()
Gets the context this SpecialPage is executed in.
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...
null for the local wiki Added in
msg()
Wrapper around wfMessage that sets the current context.
getOutput()
Get the OutputPage being used for this instance.
static isIPAddress($ip)
Determine if a string is as valid IP address or network (CIDR prefix).
getForm($options)
Generates the namespace selector form with hidden attributes.
static showLogExtract(&$out, $types=[], $page= '', $user= '', $param=[])
Show log extract.
outputHeader($summaryMessageKey= '')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
Parent class for all special pages.
wfGetLB($wiki=false)
Get a load balancer object.
static getCanonicalName($index)
Returns the canonical (English) name for a given index.
displayRestrictionError()
Output an error message telling the user what access level they have to have.
static newFromTarget($specificTarget, $vagueTarget=null, $fromMaster=false)
Given a target and the target's type, get an existing Block object if possible.
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist removed from all revisions and log entries to which it was applied This gives extensions a chance to take it off their books as the deletion has already been partly carried out by this point or something similar the user will be unable to create the tag set and then return false from the hook function Ensure you consume the ChangeTagAfterDelete hook to carry out custom deletion actions as context called by AbstractContent::getParserOutput May be used to override the normal model specific rendering of page content as context as context $options
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such and we might be restricted by PHP settings such as safe mode or open_basedir We cannot assume that the software even has read access anywhere useful Many shared hosts run all users web applications under the same user
Wikitext formatted, in the key only.
Implements Special:DeletedContributions to display archived revisions.
getSkin()
Shortcut to get the skin being used for this instance.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes! ...
getSubTitle($userObj)
Generates the subheading with links.
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add text
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a local account $user
execute($par)
Special page "deleted user contributions".
wfArrayInsertAfter(array $array, array $insert, $after)
Insert array into another array after the specified KEY
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
error also a ContextSource you ll probably need to make sure the header is varied on $request
getUser()
Shortcut to get the User executing this instance.
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at name
getConfig()
Shortcut to get main config object.
getLanguage()
Shortcut to get user's language.
userCanExecute(User $user)
Checks if the given user (identified by an object) can execute this special page (as defined by $mRes...
static getUserLinks(SpecialPage $sp, User $target)
Links to different places.
getRequest()
Get the WebRequest being used for this instance.
MediaWiki Linker LinkRenderer null $linkRenderer