commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-new / views / modules / aggregator / views_handler_argument_aggregator_category_cid.inc
1 <?php
2
3 /**
4 * @file
5 * Definition of views_handler_argument_aggregator_category_cid.
6 */
7
8 /**
9 * Argument handler to accept an aggregator category id.
10 *
11 * @ingroup views_argument_handlers
12 */
13 class views_handler_argument_aggregator_category_cid extends views_handler_argument_numeric {
14 /**
15 * Override the behavior of title(). Get the title of the category.
16 */
17 function title_query() {
18 $titles = array();
19
20 $result = db_query("SELECT c.title FROM {aggregator_category} c WHERE c.cid IN (:cid)", array(':cid' => $this->value));
21 foreach ($result as $term) {
22 $titles[] = check_plain($term->title);
23 }
24 return $titles;
25 }
26 }