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