Commit 308fe88a authored by dawehner's avatar dawehner

Add additional query tags

parent 9227dc99
......@@ -38,6 +38,7 @@ class views_handler_argument_term_node_tid extends views_handler_argument_many_t
function title_query() {
$titles = array();
$result = db_select('taxonomy_term_data', 'td')
->addTag('term_access')
->fields('td', array('name'))
->condition('td.tid', $this->value)
->execute();
......
......@@ -139,6 +139,7 @@ class views_plugin_argument_validate_taxonomy_term extends views_plugin_argument
// if unverified tids left - verify them and cache results
if (count($test)) {
$query = db_select('taxonomy_term_data', 'td');
$query->addTag('term_access');
$query->leftJoin('taxonomy_vocabulary', 'tv', 'td.vid = tv.vid');
$query->fields('td');
$query->fields('tv', array('machine_name'));
......@@ -167,6 +168,7 @@ class views_plugin_argument_validate_taxonomy_term extends views_plugin_argument
case 'name':
case 'convert':
$query = db_select('taxonomy_term_data', 'td');
$query->addTag('term_access');
$query->leftJoin('taxonomy_vocabulary', 'tv', 'td.vid = tv.vid');
$query->fields('td');
$query->fields('tv', array('machine_name'));
......@@ -202,6 +204,7 @@ class views_plugin_argument_validate_taxonomy_term extends views_plugin_argument
$arg_keys = array_flip($args);
$query = db_select('taxonomy_term_data', 'td');
$query->addTag('term_access');
$query->condition('tid', $args);
$query->addField('td', 'tid', 'tid');
if (!empty($vocabularies)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment