/** * Alters the query with the 'is_online' and 'uid' filters. Also adds a condition on the * siteid, which must be the same as the current site or zero. */ protected function alter_query(Query $query, array $filters) { return parent::alter_query($query, $filters)->filter_by_constructor($this->module->id)->similar_site; }
protected function alter_query(Query $query, array $filters) { global $core; return parent::alter_query($query, $filters)->where('(SELECT 1 FROM {prefix}nodes WHERE nid = comment.nid AND (siteid = 0 OR siteid = ?)) IS NOT NULL', $core->site_id); }