function filebrowser_db_rewrite_sql in Filebrowser 7.2
Same name and namespace in other branches
- 8 filebrowser.module \filebrowser_db_rewrite_sql()
- 6.2 filebrowser.module \filebrowser_db_rewrite_sql()
- 7.4 filebrowser.module \filebrowser_db_rewrite_sql()
- 7.3 filebrowser.module \filebrowser_db_rewrite_sql()
hook_db_rewrite_sql implementation.
File
- ./
filebrowser.module, line 326
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;
}
}