summaryrefslogtreecommitdiff
path: root/www/functions/func_select.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/functions/func_select.php')
-rwxr-xr-xwww/functions/func_select.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/www/functions/func_select.php b/www/functions/func_select.php
index 2acfb93..a720feb 100755
--- a/www/functions/func_select.php
+++ b/www/functions/func_select.php
@@ -24,12 +24,12 @@ function select_file_id($db, $owner, $folder_path){
for($i=0; $i<$length; $i++){
- $parentdir_db = $db->query("SELECT id, parent FROM files WHERE owner=" . $owner . " AND folder='DIRECTORY' " . $share . " AND parent=" . $parentdir . " AND name='" . SQLite3::escapeString($folder_array_unsafe[$i]) . "';");
+ $parentdir_db = $db->query("SELECT id, parent FROM files WHERE owner=" . $owner . " AND " . $share . " AND parent=" . $parentdir . " AND name='" . SQLite3::escapeString($folder_array_unsafe[$i]) . "';");
$prim_id = $parentdir_db->fetchArray(SQLITE3_NUM);
if(empty($prim_id[0])){
- return $parentdir;
+ return $parentdir; //TODO; Return false because file not found
}
if($parentdir != $prim_id[1]){