39 private $commentStore;
59 parent::__construct( $context,
$page,
$ids, $lbFactory );
60 $this->commentStore = $commentStore;
61 $this->logFormatterFactory = $logFormatterFactory;
73 return 'deletelogentry';
77 return LogPage::DELETED_ACTION;
81 $dbr = MediaWikiServices::getInstance()->getConnectionProvider()->getReplicaDatabase();
82 $result = $dbr->newSelectQueryBuilder()
83 ->select(
'log_type' )
86 ->where( [
'log_id' =>
$ids ] )
87 ->caller( __METHOD__ )->fetchResultSet();
88 if ( $result->numRows() == 1 ) {
90 return SpecialPage::getTitleFor(
'Log', $result->current()->log_type );
93 return SpecialPage::getTitleFor(
'Log' );
101 $ids = array_map(
'intval', $this->ids );
102 $queryBuilder = $db->newSelectQueryBuilder()
114 'log_user' =>
'actor_user',
115 'log_user_text' =>
'actor_name',
116 'log_comment_text' =>
'comment_log_comment.comment_text',
117 'log_comment_data' =>
'comment_log_comment.comment_data',
118 'log_comment_cid' =>
'comment_log_comment.comment_id'
121 ->join(
'actor',
null,
'actor_id=log_actor' )
122 ->join(
'comment',
'comment_log_comment',
'comment_log_comment.comment_id = log_comment_id' )
123 ->where( [
'log_id' =>
$ids ] )
124 ->orderBy( [
'log_timestamp',
'log_id' ], SelectQueryBuilder::SORT_DESC );
126 MediaWikiServices::getInstance()->getChangeTagsStore()->modifyDisplayQueryBuilder( $queryBuilder,
'logging' );
128 return $queryBuilder->caller( __METHOD__ )->fetchResultSet();
136 MediaWikiServices::getInstance()->getConnectionProvider(),
137 $this->logFormatterFactory
148 '5::ofield' =>
$params[
'oldBits'],
149 '6::nfield' =>
$params[
'newBits'],
array $params
The job parameters.
Parent class for all special pages.
Item class for a logging table row.
List for logging table items.
getLogParams( $params)
Get log parameter array.
getLogAction()
Get the log action for this list type.
static getRestriction()
Get the user right required for this list type Override this function.
static getRelationType()
Get the DB field name associated with the ID list.
__construct(IContextSource $context, PageIdentity $page, array $ids, LBFactory $lbFactory, CommentStore $commentStore, LogFormatterFactory $logFormatterFactory)
getType()
Get the internal type name of this list.
static suggestTarget( $target, array $ids)
Suggest a target for the revision deletion Optionally override this function.
static getRevdelConstant()
Get the revision deletion constant for this list type Override this function.
newItem( $row)
Create an item object from a DB result row.
Interface for objects which can provide a MediaWiki context on request.
Interface for objects (potentially) representing an editable wiki page.