You are here

function filebrowser_db_rewrite_sql in Filebrowser 7.4

Same name and namespace in other branches
  1. 8 filebrowser.module \filebrowser_db_rewrite_sql()
  2. 6.2 filebrowser.module \filebrowser_db_rewrite_sql()
  3. 7.2 filebrowser.module \filebrowser_db_rewrite_sql()
  4. 7.3 filebrowser.module \filebrowser_db_rewrite_sql()

hook_db_rewrite_sql implementation.

File

./filebrowser.module, line 341

Code

function filebrowser_db_rewrite_sql($query, $primary_table, $primary_field, $args) {
  global $user;
  if ($primary_table == 'n' && $primary_field == 'nid' && !user_access(FILEBROWSER_VIEW_DIRECTORY_LISTINGS, $user)) {
    $return = array(
      'where' => "n.type != 'dir_listing'",
    );
    return $return;
  }
}