commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-new / views / modules / taxonomy / views_handler_argument_vocabulary_machine_name.inc
1 <?php
2
3 /**
4 * @file
5 * Definition of views_handler_argument_vocabulary_machine_name.
6 */
7
8 /**
9 * Argument handler to accept a vocabulary machine name.
10 *
11 * @ingroup views_argument_handlers
12 */
13 class views_handler_argument_vocabulary_machine_name extends views_handler_argument_string {
14 /**
15 * Override the behavior of title(). Get the name of the vocabulary..
16 */
17 function title() {
18 $title = db_query("SELECT v.name FROM {taxonomy_vocabulary} v WHERE v.machine_name = :machine_name", array(':machine_name' => $this->argument))->fetchField();
19
20 if (empty($title)) {
21 return t('No vocabulary');
22 }
23
24 return check_plain($title);
25 }
26 }