You are here

function filebrowser_db_rewrite_sql in Filebrowser 8

Same name and namespace in other branches
  1. 6.2 filebrowser.module \filebrowser_db_rewrite_sql()
  2. 7.4 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 238
Validates file path input on node form

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_DIRECORY_LISTINGS, $user)) {
    $return = array(
      'where' => "n.type != 'dir_listing'",
    );
    return $return;
  }
}