mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-24 07:54:13 +00:00
Fix UserMerge integration for use with table prefix
This fixes tests, because EchoHooks has "echo_event.*" which is invalid with table prefixes, like done in unit tests Added EchoEvent::selectFields() for future use and to replace more SELECT * Bug: T217487 Change-Id: I51cb46812431635d11780633dc7d807cd04f813d
This commit is contained in:
parent
8da7e5b04a
commit
8ce0cc171d
|
@ -1405,7 +1405,7 @@ class EchoHooks {
|
|||
$thankYouIds = [];
|
||||
$thankYouRows = $dbw->select(
|
||||
[ 'echo_notification', 'echo_event' ],
|
||||
'echo_event.*',
|
||||
EchoEvent::selectFields(),
|
||||
[
|
||||
'notification_user' => $newUser->getId(),
|
||||
'notification_event = event_id',
|
||||
|
|
|
@ -723,4 +723,25 @@ class EchoEvent extends EchoAbstractEntity implements Bundleable {
|
|||
public function getSortingKey() {
|
||||
return $this->getTimestamp();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the list of fields that should be selected to create
|
||||
* a new event with EchoEvent::newFromRow
|
||||
* @return string[]
|
||||
*/
|
||||
public static function selectFields() {
|
||||
return [
|
||||
'event_id',
|
||||
'event_type',
|
||||
'event_variant',
|
||||
'event_agent_id',
|
||||
'event_agent_ip',
|
||||
'event_page_namespace',
|
||||
'event_page_title',
|
||||
'event_extra',
|
||||
'event_page_id',
|
||||
'event_deleted',
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue