38 private $commentStore;
55 parent::__construct( $context,
$page,
$ids, $lbFactory );
56 $this->commentStore = $commentStore;
68 return 'deletelogentry';
76 $dbr = MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->getReplicaDatabase();
77 $result = $dbr->newSelectQueryBuilder()
78 ->select(
'log_type' )
81 ->where( [
'log_id' =>
$ids ] )
82 ->caller( __METHOD__ )->fetchResultSet();
83 if ( $result->numRows() == 1 ) {
85 return SpecialPage::getTitleFor(
'Log', $result->current()->log_type );
88 return SpecialPage::getTitleFor(
'Log' );
96 $ids = array_map(
'intval', $this->ids );
98 $commentQuery = $this->commentStore->getJoin(
'log_comment' );
101 'tables' => [
'logging',
'actor' ] + $commentQuery[
'tables'],
113 'log_user' =>
'actor_user',
114 'log_user_text' =>
'actor_name'
115 ] + $commentQuery[
'fields'],
116 'conds' => [
'log_id' =>
$ids ],
117 'options' => [
'ORDER BY' => [
'log_timestamp DESC',
'log_id DESC' ] ],
119 'actor' => [
'JOIN',
'actor_id=log_actor' ]
120 ] + $commentQuery[
'joins'],
124 $queryInfo[
'tables'],
125 $queryInfo[
'fields'],
127 $queryInfo[
'join_conds'],
128 $queryInfo[
'options'],
133 $queryInfo[
'tables'],
134 $queryInfo[
'fields'],
137 $queryInfo[
'options'],
138 $queryInfo[
'join_conds']
143 return new RevDelLogItem( $this, $row, $this->commentStore );
152 '4::ids' => $params[
'ids'],
153 '5::ofield' => $params[
'oldBits'],
154 '6::nfield' => $params[
'newBits'],
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.
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.
__construct(IContextSource $context, PageIdentity $page, array $ids, LBFactory $lbFactory, CommentStore $commentStore)
Interface for objects which can provide a MediaWiki context on request.
Interface for objects (potentially) representing an editable wiki page.