mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-09-24 18:59:40 +00:00
Don't select echo_event.*
Removed fetchByTypesAndPage since it is now unused Fixed fetchByPage to select simple * instead of echo_event.* Bug: T105890 Change-Id: I486f27501a649d5368305965d2cd012afe0915b2
This commit is contained in:
parent
48d5ef4fd1
commit
9dd4e4ee30
|
@ -146,34 +146,6 @@ class EchoEventMapper extends EchoAbstractMapper {
|
|||
return $res;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch events of certain types associated with a page
|
||||
*
|
||||
* @param string[] $eventTypes
|
||||
* @param int $pageId
|
||||
* @return EchoEvent[]
|
||||
*/
|
||||
public function fetchByTypesAndPage( $eventTypes, $pageId ) {
|
||||
$dbr = $this->dbFactory->getEchoDb( DB_SLAVE );
|
||||
$res = $dbr->select(
|
||||
array( 'echo_event', 'echo_target_page' ),
|
||||
array( 'echo_event.*' ),
|
||||
array(
|
||||
'event_id=etp_event',
|
||||
'event_type' => $eventTypes,
|
||||
'etp_page' => $pageId,
|
||||
),
|
||||
__METHOD__
|
||||
);
|
||||
|
||||
$data = array();
|
||||
foreach ( $res as $row ) {
|
||||
$data[] = EchoEvent::newFromRow( $row );
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch events associated with a page
|
||||
*
|
||||
|
@ -186,7 +158,7 @@ class EchoEventMapper extends EchoAbstractMapper {
|
|||
$dbr = $this->dbFactory->getEchoDb( DB_SLAVE );
|
||||
$res = $dbr->select(
|
||||
array( 'echo_event', 'echo_target_page' ),
|
||||
array( 'echo_event.*' ),
|
||||
array( '*' ),
|
||||
array(
|
||||
'etp_page' => $pageId
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue