Background
IEventLookup::getEventsForDiscoveryByPage takes a single
string $pageTitle. To support MoreLike results the method must accept an array of prefixed
titles so one DB query can match any of them. EventStore already implements the full join
(ce_worklist_pages → ce_worklist_events → campaign_events, left-joining
ce_participants to exclude existing participants); only the WHERE clause and the interface
signature need updating.
Type of story
- Backend
Acceptance criteria
- IEventLookup::getEventsForDiscoveryByPage signature changes from string $pageTitle to array $pageTitles.
- EventStore implementation replaces the equality condition on cewp_page_prefixedtext with an IN condition over $pageTitles.
- Returns an empty array immediately when $pageTitles is empty (no DB query issued).
- All existing callers (DiscoverableEventsLookup, any test doubles) updated to pass an array.
- Code passes Phan analysis and MediaWiki code sniffer.
Are there dependencies (on someone else or learning something new)?
- None — the existing implementation and tests are the baseline; this is a targeted change to the signature and query.
Testing required?
- Yes
- Minimum to pass QA: extend existing integration tests to cover passing multiple titles where only one matches (confirming the IN condition works) and passing an empty array (confirming the early return).