You are here

function patron_db_rewrite_sql in Library 6

Same name and namespace in other branches
  1. 5.2 patron/patron.module \patron_db_rewrite_sql()

Implementation of hook_db_rewrite_sql().

File

patron/patron.module, line 108

Code

function patron_db_rewrite_sql($query, $primary_table, $primary_field, $args) {
  if ($query == '' && $primary_table == 'n' && ($primary_field = 'nid' && empty($args))) {
    $excluded_types = array(
      'patron',
    );
    if (!empty($excluded_types)) {
      $where = " n.type NOT IN ('" . join("','", $excluded_types) . "') ";
      return array(
        'where' => $where,
      );
    }
  }
}