Stripping CVS keywords
[project/views.git] / modules / node / views_handler_argument_node_nid.inc
CommitLineData
fe44beb7 1<?php
fe44beb7
EM
2/**
3 * @file
4 * Provide node nid argument handler.
5 */
6
7/**
8 * Argument handler to accept a node id.
9 */
10class views_handler_argument_node_nid extends views_handler_argument_numeric {
11 /**
12 * Override the behavior of title(). Get the title of the node.
13 */
14 function title_query() {
15 $titles = array();
16 $placeholders = implode(', ', array_fill(0, sizeof($this->value), '%d'));
17
18 $result = db_query("SELECT n.title FROM {node} n WHERE n.nid IN ($placeholders)", $this->value);
19 while ($term = db_fetch_object($result)) {
20 $titles[] = check_plain($term->title);
21 }
22 return $titles;
23 }
24}
25