Go to the documentation of this file.
42 $msgs =
array(
'deletionlog',
'undeleteviewlink',
'diff' );
43 foreach ( $msgs
as $msg ) {
44 $this->
messages[$msg] = $this->
msg( $msg )->escaped();
52 $query = parent::getDefaultQuery();
63 if ( !
$user->isAllowed(
'deletedhistory' ) ) {
65 } elseif ( !
$user->isAllowed(
'suppressrevision' ) ) {
71 'tables' =>
array(
'archive' ),
73 'ar_rev_id',
'ar_namespace',
'ar_title',
'ar_timestamp',
'ar_comment',
74 'ar_minor_edit',
'ar_user',
'ar_user_text',
'ar_deleted'
77 'options' =>
array(
'USE INDEX' => $index )
85 $index =
'usertext_timestamp';
87 return array( $index, $condition );
91 return 'ar_timestamp';
103 if ( isset( $this->mNavigationBar ) ) {
108 'prev' => $this->
msg(
'pager-newer-n' )->numParams( $this->mLimit )->escaped(),
109 'next' => $this->
msg(
'pager-older-n' )->numParams( $this->mLimit )->escaped(),
110 'first' => $this->
msg(
'histlast' )->escaped(),
111 'last' => $this->
msg(
'histfirst' )->escaped()
117 $limits = $lang->pipeList( $limitLinks );
119 $firstLast = $lang->pipeList(
array( $pagingLinks[
'first'], $pagingLinks[
'last'] ) );
120 $firstLast = $this->
msg(
'parentheses' )->rawParams( $firstLast )->escaped();
121 $prevNext = $this->
msg(
'viewprevnext' )
123 $pagingLinks[
'prev'],
124 $pagingLinks[
'next'],
127 $separator = $this->
msg(
'word-separator' )->escaped();
128 $this->mNavigationBar = $firstLast . $separator . $prevNext;
134 if ( $this->
namespace !==
'' ) {
135 return array(
'ar_namespace' => (
int)$this->
namespace );
160 'id' => $row->ar_rev_id,
161 'comment' => $row->ar_comment,
162 'user' => $row->ar_user,
163 'user_text' => $row->ar_user_text,
164 'timestamp' => $row->ar_timestamp,
165 'minor_edit' => $row->ar_minor_edit,
166 'deleted' => $row->ar_deleted,
178 'page' => $page->getPrefixedText()
189 if (
$user->isAllowed(
'deletedtext' ) ) {
195 'target' => $page->getPrefixedText(),
196 'timestamp' =>
$rev->getTimestamp(),
206 $date = htmlspecialchars( $date );
214 array(
'class' =>
'mw-changeslist-date' ),
216 'target' => $page->getPrefixedText(),
217 'timestamp' =>
$rev->getTimestamp()
223 $link =
'<span class="history-deleted">' .
$link .
'</span>';
229 array(
'class' =>
'mw-changeslist-title' )
232 if (
$rev->isMinor() ) {
246 array(
'class' =>
'mw-deletedcontribs-tools' ),
247 $this->
msg(
'parentheses' )->rawParams( $this->
getLanguage()->pipeList(
248 array(
$last, $dellog, $reviewlink ) ) )->escaped()
251 $separator =
'<span class="mw-changeslist-separator">. .</span>';
252 $ret =
"{$del}{$link} {$tools} {$separator} {$mflag} {$pagelink} {$comment}";
254 # Denote if username is redacted for this edit
256 $ret .=
" <strong>" . $this->
msg(
'rev-deleted-user-contribs' )->escaped() .
"</strong>";
278 parent::__construct(
'DeletedContributions',
'deletedhistory',
279 true,
false,
false );
289 global $wgQueryPageDefaultLimit;
304 $out->setPageTitle( $this->
msg(
'deletedcontributions-title' ) );
308 if ( $par !==
null ) {
311 $target = $request->getVal(
'target' );
314 if ( !strlen( $target ) ) {
320 $options[
'limit'] = $request->getInt(
'limit', $wgQueryPageDefaultLimit );
329 $this->
getSkin()->setRelevantUser( $userObj );
331 $target = $userObj->getName();
334 if ( ( $ns = $request->getVal(
'namespace',
null ) ) !==
null && $ns !==
'' ) {
335 $options[
'namespace'] = intval( $ns );
343 if ( !$pager->getNumRows() ) {
344 $out->addWikiMsg(
'nocontribs' );
349 # Show a message about slave lag, if applicable
350 $lag =
wfGetLB()->safeGetLag( $pager->getDatabase() );
352 $out->showLagWarning( $lag );
356 '<p>' . $pager->getNavigationBar() .
'</p>' .
358 '<p>' . $pager->getNavigationBar() .
'</p>' );
360 # If there were contributions, and it was a valid user or IP, show
361 # the appropriate "footer" message - WHOIS tools, etc.
362 if ( $target !=
'newbies' ) {
364 'sp-contributions-footer-anon' :
365 'sp-contributions-footer';
367 if ( !$this->
msg( $message )->isDisabled() ) {
369 "<div class='mw-contributions-footer'>\n$1\n</div>",
370 array( $message, $target )
383 if ( $userObj->isAnon() ) {
384 $user = htmlspecialchars( $userObj->getName() );
386 $user =
Linker::link( $userObj->getUserPage(), htmlspecialchars( $userObj->getName() ) );
389 $nt = $userObj->getUserPage();
390 $id = $userObj->getID();
391 $talk = $nt->getTalkPage();
395 if ( ( $id !==
null ) || ( $id ===
null &&
IP::isIPAddress( $nt->getText() ) ) ) {
396 # Block / Change block / Unblock links
397 if ( $this->
getUser()->isAllowed(
'block' ) ) {
398 if ( $userObj->isBlocked() ) {
401 $this->
msg(
'change-blocklink' )->escaped()
405 $this->
msg(
'unblocklink' )->escaped(),
408 'action' =>
'unblock',
409 'ip' => $nt->getDBkey()
413 # User is not blocked
416 $this->
msg(
'blocklink' )->escaped()
423 $this->
msg(
'sp-contributions-blocklog' )->escaped(),
427 'page' => $nt->getPrefixedText()
430 # Suppression log link (bug 59120)
431 if ( $this->
getUser()->isAllowed(
'suppressionlog' ) ) {
434 $this->
msg(
'sp-contributions-suppresslog' )->escaped(),
436 array(
'offender' => $userObj->getName() )
444 $this->
msg(
'sp-contributions-uploads' )->escaped()
450 $this->
msg(
'sp-contributions-logs' )->escaped(),
452 array(
'user' => $nt->getText() )
454 # Link to contributions
457 $this->
msg(
'sp-deletedcontributions-contribs' )->escaped()
460 # Add a link to change user rights for privileged users
462 $userrightsPage->setContext( $this->
getContext() );
463 if ( $userrightsPage->userCanChangeRights( $userObj ) ) {
466 $this->
msg(
'sp-contributions-userrights' )->escaped()
475 if ( $userObj->isBlocked() ) {
485 'showIfEmpty' =>
false,
487 'sp-contributions-blocked-notice',
488 $nt->getText() # Support GENDER
in 'sp-contributions-blocked-notice'
490 'offset' =>
'' # don
't use $this->getRequest() parameter offset
496 return $this->msg( 'contribsub2
' )->rawParams( $user, $links )->params( $userObj->getName() );
504 function getForm( $options ) {
507 $options['title'] = $this->getPageTitle()->getPrefixedText();
508 if ( !isset( $options['target
'] ) ) {
509 $options['target
'] = '';
511 $options['target
'] = str_replace( '_
', ' ', $options['target
'] );
514 if ( !isset( $options['namespace'] ) ) {
515 $options['namespace'] = '';
518 if ( !isset( $options['contribs
'] ) ) {
519 $options['contribs
'] = 'user';
522 if ( $options['contribs
'] == 'newbie
' ) {
523 $options['target
'] = '';
526 $f = Xml::openElement( 'form', array( 'method
' => 'get', 'action' => $wgScript ) );
528 foreach ( $options as $name => $value ) {
529 if ( in_array( $name, array( 'namespace', 'target
', 'contribs
' ) ) ) {
532 $f .= "\t" . Html::hidden( $name, $value ) . "\n";
535 $f .= Xml::openElement( 'fieldset
' );
536 $f .= Xml::element( 'legend
', array(), $this->msg( 'sp-contributions-search
' )->text() );
539 array( 'for' => 'target
' ),
540 $this->msg( 'sp-contributions-username
' )->parse()
549 ) + ( $options['target
'] ? array() : array( 'autofocus
' ) )
551 $f .= Html::namespaceSelector(
553 'selected
' => $options['namespace'],
555 'label
' => $this->msg( 'namespace' )->text()
558 'name' => 'namespace',
560 'class' => 'namespaceselector
',
563 $f .= Xml::submitButton( $this->msg( 'sp-contributions-submit
' )->text() );
564 $f .= Xml::closeElement( 'fieldset
' );
565 $f .= Xml::closeElement( 'form' );
570 protected function getGroupName() {
static & makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
getForm( $options)
Generates the namespace selector form with hidden attributes.
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
msg()
Get a Message object with context set Parameters are the same as wfMessage()
getOutput()
Get the OutputPage being used for this instance.
execute( $par)
Special page "deleted user contributions".
wfGetLB( $wiki=false)
Get a load balancer object.
& wfGetDB( $db, $groups=array(), $wiki=false)
Get a Database object.
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
wfProfileIn( $functionname)
Begin profiling of a function.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses & $ret
displayRestrictionError()
Output an error message telling the user what access level they have to have.
static newFromName( $name, $validate='valid')
Static factory method for creation from username.
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name.
getSkin()
Shortcut to get the skin being used for this instance.
getLanguage()
Shortcut to get user's language.
namespace and then decline to actually register it RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist but no entry for that model exists in $wgContentHandlers if desired whether it is OK to use $contentModel on $title Handler functions that modify $ok should generally return false to prevent further hooks from further modifying $ok in case the handler function wants to provide a converted Content object Note that $result getContentModel() must return $toModel. Handler functions that modify $result should generally return false to further attempts at conversion. 'ContribsPager you ll need to handle error messages
getUser()
Get the User object.
set to $title object and return false for a match for latest after cache objects are set use the ContentHandler facility to handle CSS and JavaScript for highlighting & $link
static linkKnown( $target, $html=null, $customAttribs=array(), $query=array(), $options=array( 'known', 'noclasses'))
Identical to link(), except $options defaults to 'known'.
static flag( $flag)
Provide the "<abbr>" element appropriate to a given abbreviated flag, namely the flag indicating a ne...
static link( $target, $html=null, $customAttribs=array(), $query=array(), $options=array())
This function returns an HTML link to the given target.
getLanguage()
Get the Language object.
to move a page</td >< td > &*You are moving the page across *A non empty talk page already exists under the new or *You uncheck the box below In those you will have to move or merge the page manually if desired</td >< td > be sure to &You are responsible for making sure that links continue to point where they are supposed to go Note that the page will &a page at the new title
Special page to allow managing user group membership.
wfProfileOut( $functionname='missing')
Stop profiling of a function.
wfRunHooks( $event, array $args=array(), $deprecatedVersion=null)
Call hook functions defined in $wgHooks.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
getUser()
Shortcut to get the User executing this instance.
when a variable name is used in a it is silently declared as a new masking the global
null means default in associative array form
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
getContext()
Gets the context this SpecialPage is executed in.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped & $options
static revComment(Revision $rev, $local=false, $isPublic=false)
Wrap and format the given revision's comment block, if the current user is allowed to view it.
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
userCanExecute(User $user)
Checks if the given user (identified by an object) can execute this special page (as defined by $mRes...
msg()
Wrapper around wfMessage that sets the current context.
Parent class for all special pages.
static getRevDeleteLink(User $user, Revision $rev, Title $title)
Get a revision-deletion link, or disabled link, or nothing, depending on user permissions & the setti...
static configuration should be added through ResourceLoaderGetConfigVars instead can be used to get the real title after the basic globals have been set but before ordinary actions take place change it to the message you want to define which works for all SkinTemplate type skins $tools
getRequest()
Get the WebRequest being used for this instance.
div flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LoginAuthenticateAudit' this hook is for auditing only etc block
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 account $user
Interface for objects which can provide a context on request.
presenting them properly to the user as errors is done by the caller return true use this to change the list i e etc $rev
Prior to maintenance scripts were a hodgepodge of code that had no cohesion or formal method of action Beginning in
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 as
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 name
static rawElement( $element, $attribs=array(), $contents='')
Returns an HTML element in a string.
return true to allow those checks to and false if checking is done use this to change the tables headers temp or archived zone change it to an object instance and return false override the list derivative used the name of the old file when set the default code will be skipped add a value to it if you want to add a cookie that have to vary cache options can modify $query
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
static isIPAddress( $ip)
Determine if a string is as valid IP address or network (CIDR prefix).
static showLogExtract(&$out, $types=array(), $page='', $user='', $param=array())
Show log extract.