view->relationship[$this->options['relationship']]->get_flag(); } /** * Override the behavior of title(). Get the title of the appropriate objects. */ function title_query() { if (!($flag = $this->get_flag())) { return array(); // Error message is printed by get_flag(). } $views_info = $flag->get_views_info(); $titles = array(); $placeholders = implode(', ', array_fill(0, sizeof($this->value), '%d')); $result = db_query("SELECT o.". $views_info['title field'] ." FROM {". $views_info['views table'] ."} o WHERE o.". $views_info['join field'] ." IN ($placeholders)", $this->value); while ($title = db_fetch_object($result)) { $titles[] = check_plain($title->$views_info['title field']); } return $titles; } }