HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.2.34
System: Linux atalantini.com 3.10.0-1127.13.1.el7.x86_64 #1 SMP Tue Jun 23 15:46:38 UTC 2020 x86_64
User: root (0)
PHP: 7.2.34
Disabled: NONE
Upload Files
File: /var/www/html/coreplad/modules/simpletest/tests/taxonomy_nodes_test.module
<?php

/**
 * @file
 * Dummy module implementing hook_query_TAG_alter.
 */

/**
 * Implements hook_query_TAG_alter().
 */
function taxonomy_nodes_test_query_node_access_alter(QueryAlterableInterface $query) {
  if (variable_get('taxonomy_nodes_test_query_node_access_alter', FALSE)) {
    $taxonomy_index = FALSE;
    foreach ($query->getTables() as $alias => $table) {
      if ($table['table'] == 'taxonomy_index') {
        $taxonomy_index = TRUE;
      }
    }

    if ($taxonomy_index) {
      // Verify that additional data can be added to the default
      // taxonomy_select_nodes() query by altering it.
      $query->leftJoin('taxonomy_term_data', 'ttd', 'ttd.tid = t.tid');
    }
  }
}