mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-28 01:30:15 +00:00
b3c07eedeb
Target page entries used to exist for each user that was notified for an event. They were removed as the notifications were marked as read. Now they remain so that the association between pages and events can be used for moderation regardless of the notifications read status. This patch removes everything about echo_target_page.etp_user from sql and php code. Bug: T143959 Change-Id: Ib57510e6b0e9202a7e035f8ea59955dca8a0b24a
33 lines
632 B
PHP
33 lines
632 B
PHP
<?php
|
|
|
|
/**
|
|
* Database mapper for EchoTargetPage model
|
|
*/
|
|
class EchoTargetPageMapper extends EchoAbstractMapper {
|
|
|
|
/**
|
|
* List of db fields used to construct an EchoTargetPage model
|
|
* @var string[]
|
|
*/
|
|
protected static $fields = array(
|
|
'etp_page',
|
|
'etp_event'
|
|
);
|
|
|
|
/**
|
|
* Insert an EchoTargetPage instance into the database
|
|
*
|
|
* @param EchoTargetPage $targetPage
|
|
* @return boolean
|
|
*/
|
|
public function insert( EchoTargetPage $targetPage ) {
|
|
$dbw = $this->dbFactory->getEchoDb( DB_MASTER );
|
|
|
|
$row = $targetPage->toDbArray();
|
|
|
|
$res = $dbw->insert( 'echo_target_page', $row, __METHOD__ );
|
|
|
|
return $res;
|
|
}
|
|
}
|