RevDel_List Class Reference

Abstract base class for a list of deletable items. More...

Inherited by RevDel_FileList, RevDel_LogList, and RevDel_RevisionList.

List of all members.

Public Member Functions

 __construct ($special, $title, $ids)
 getType ()
 Get the internal type name of this list.
 getIdField ()
 Get the DB field name associated with the ID list.
 getTimestampField ()
 Get the DB field name storing timestamps.
 getAuthorIdField ()
 Get the DB field name storing user ids.
 getAuthorNameField ()
 Get the DB field name storing user names.
 setVisibility ($params)
 Set the visibility for the revisions in this list.
 reloadFromMaster ()
 Reload the list data from the master DB.
 getLogAction ()
 Get the log action for this list type.
 getLogParams ($params)
 Get log parameter array.
 reset ()
 Start iteration.
 current ()
 Get the current list item, or false if we are at the end.
 next ()
 Move the iteration pointer to the next list item, and return it.
 length ()
 Get the number of items in the list.
 clearFileOps ()
 Clear any data structures needed for doPreCommitUpdates() and doPostCommitUpdates() STUB.
 doPreCommitUpdates ()
 A hook for setVisibility(): do batch updates pre-commit.
 doPostCommitUpdates ()
 A hook for setVisibility(): do any necessary updates post-commit.
 newItem ($row)
 Create an item object from a DB result row.
 doQuery ($db)
 Do the DB query to iterate through the objects.
 getSuppressBit ()
 Get the integer value of the flag used for suppression.

Public Attributes

 $special
 $title
 $ids
 $res
 $current
 $type = null
 $idField = null
 $dateField = false
 $authorIdField = false
 $authorNameField = false

Protected Member Functions

 updateLog ($params)
 Record a log entry on the action.
 initCurrent ()
 Initialise the current iteration pointer.


Detailed Description

Abstract base class for a list of deletable items.

Definition at line 705 of file SpecialRevisiondelete.php.


Constructor & Destructor Documentation

RevDel_List::__construct ( special,
title,
ids 
)

Parameters:
$special The parent SpecialPage
$title The target title
$ids Array of IDs

Definition at line 718 of file SpecialRevisiondelete.php.

References $ids, $special, and $title.


Member Function Documentation

RevDel_List::clearFileOps (  ) 

Clear any data structures needed for doPreCommitUpdates() and doPostCommitUpdates() STUB.

Reimplemented in RevDel_FileList.

Definition at line 1002 of file SpecialRevisiondelete.php.

Referenced by setVisibility().

RevDel_List::current (  ) 

Get the current list item, or false if we are at the end.

Definition at line 974 of file SpecialRevisiondelete.php.

Referenced by initCurrent(), next(), reset(), and setVisibility().

RevDel_List::doPostCommitUpdates (  ) 

A hook for setVisibility(): do any necessary updates post-commit.

STUB

Returns:
Status

Reimplemented in RevDel_RevisionList, RevDel_ArchiveList, and RevDel_FileList.

Definition at line 1019 of file SpecialRevisiondelete.php.

References Status::newGood().

Referenced by setVisibility().

RevDel_List::doPreCommitUpdates (  ) 

A hook for setVisibility(): do batch updates pre-commit.

STUB

Returns:
Status

Reimplemented in RevDel_RevisionList, RevDel_ArchiveList, and RevDel_FileList.

Definition at line 1010 of file SpecialRevisiondelete.php.

References Status::newGood().

Referenced by setVisibility().

RevDel_List::doQuery ( db  )  [abstract]

Do the DB query to iterate through the objects.

Parameters:
$db Database object to use for the query

Reimplemented in RevDel_RevisionList, RevDel_ArchiveList, RevDel_FileList, RevDel_ArchivedFileList, and RevDel_LogList.

Referenced by reloadFromMaster(), reset(), and setVisibility().

RevDel_List::getAuthorIdField (  ) 

Get the DB field name storing user ids.

Definition at line 748 of file SpecialRevisiondelete.php.

RevDel_List::getAuthorNameField (  ) 

Get the DB field name storing user names.

Definition at line 755 of file SpecialRevisiondelete.php.

RevDel_List::getIdField (  ) 

Get the DB field name associated with the ID list.

Definition at line 734 of file SpecialRevisiondelete.php.

RevDel_List::getLogAction (  ) 

Get the log action for this list type.

Reimplemented in RevDel_LogList.

Definition at line 927 of file SpecialRevisiondelete.php.

Referenced by updateLog().

RevDel_List::getLogParams ( params  ) 

Get log parameter array.

Parameters:
$params Associative array of log parameters, same as updateLog()
Returns:
array

Reimplemented in RevDel_LogList.

Definition at line 936 of file SpecialRevisiondelete.php.

References getType().

Referenced by updateLog().

RevDel_List::getSuppressBit (  )  [abstract]

Get the integer value of the flag used for suppression.

Reimplemented in RevDel_RevisionList, RevDel_FileList, and RevDel_LogList.

Referenced by updateLog().

RevDel_List::getTimestampField (  ) 

Get the DB field name storing timestamps.

Definition at line 741 of file SpecialRevisiondelete.php.

RevDel_List::getType (  ) 

Get the internal type name of this list.

Equal to the table name.

Definition at line 727 of file SpecialRevisiondelete.php.

Referenced by getLogParams(), and updateLog().

RevDel_List::initCurrent (  )  [protected]

Initialise the current iteration pointer.

Definition at line 948 of file SpecialRevisiondelete.php.

References current(), and newItem().

Referenced by next(), and reset().

RevDel_List::length (  ) 

Get the number of items in the list.

Definition at line 990 of file SpecialRevisiondelete.php.

RevDel_List::newItem ( row  )  [abstract]

Create an item object from a DB result row.

Parameters:
$row stdclass

Reimplemented in RevDel_RevisionList, RevDel_ArchiveList, RevDel_FileList, RevDel_ArchivedFileList, and RevDel_LogList.

Referenced by initCurrent().

RevDel_List::next (  ) 

Move the iteration pointer to the next list item, and return it.

Definition at line 981 of file SpecialRevisiondelete.php.

References current(), and initCurrent().

Referenced by setVisibility().

RevDel_List::reloadFromMaster (  ) 

Reload the list data from the master DB.

This can be done after setVisibility() to allow $item->getHTML() to show the new data.

Definition at line 884 of file SpecialRevisiondelete.php.

References $dbw, doQuery(), and wfGetDB().

RevDel_List::reset (  ) 

Start iteration.

This must be called before current() or next().

Returns:
First list item

Definition at line 961 of file SpecialRevisiondelete.php.

References current(), doQuery(), initCurrent(), and wfGetDB().

Referenced by setVisibility().

RevDel_List::setVisibility ( params  ) 

Set the visibility for the revisions in this list.

Logging and transactions are done here.

Parameters:
$params Associative array of parameters. Members are: value: The integer value to set the visibility to comment: The log comment.
Returns:
Status

Definition at line 767 of file SpecialRevisiondelete.php.

References $dbw, $msg, $ok, clearFileOps(), current(), Revision::DELETED_RESTRICTED, doPostCommitUpdates(), doPreCommitUpdates(), doQuery(), SpecialRevisionDelete::extractBitfield(), IP::isIPAddress(), Status::newGood(), next(), reset(), updateLog(), and wfGetDB().

RevDel_List::updateLog ( params  )  [protected]

Record a log entry on the action.

Parameters:
$params Associative array of parameters: newBits: The new value of the *_deleted bitfield oldBits: The old value of the *_deleted bitfield. title: The target title ids: The ID list comment: The log comment authorsIds: The array of the user IDs of the offenders authorsIPs: The array of the IP/anon user offenders

Definition at line 900 of file SpecialRevisiondelete.php.

References getLogAction(), getLogParams(), RevisionDeleter::getRelationType(), getSuppressBit(), and getType().

Referenced by setVisibility().


Member Data Documentation

RevDel_List::$authorIdField = false

RevDel_List::$authorNameField = false

RevDel_List::$current

Definition at line 706 of file SpecialRevisiondelete.php.

RevDel_List::$dateField = false

RevDel_List::$idField = null

RevDel_List::$ids

RevDel_List::$res

Definition at line 706 of file SpecialRevisiondelete.php.

RevDel_List::$special

Definition at line 706 of file SpecialRevisiondelete.php.

Referenced by __construct().

RevDel_List::$title

Definition at line 706 of file SpecialRevisiondelete.php.

Referenced by __construct().

RevDel_List::$type = null


The documentation for this class was generated from the following file:

Generated on Sat Apr 30 22:57:48 2011 for MediaWiki by  doxygen 1.5.9