summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xwww/functions/func_select.php7
1 files changed, 1 insertions, 6 deletions
diff --git a/www/functions/func_select.php b/www/functions/func_select.php
index 357b6b6..e23c3cf 100755
--- a/www/functions/func_select.php
+++ b/www/functions/func_select.php
@@ -6,21 +6,16 @@ function select_file_id($db, $owner){
} else {
$share ="AND share='PUBLIC'"; // just use files with the correct permissions
}
-
- if(empty($_GET["folder"])){
- $_GET["folder"] = "/";
- }
-
$folder_array_unsafe = explode("/",$_GET["folder"]);
$length = count($folder_array_unsafe);
$root_db = $db->query("SELECT id FROM files WHERE parent=0 AND owner=" . $owner . " AND folder='DIRECTORY' " . $share . ";");
$root_ar = $root_db->fetchArray(SQLITE3_NUM);
+ $root_id = $root_ar[0];
if(empty($root_ar)){
failure("Seems like the user doesn't want to show his tree: " . $root_id);
}
- $root_id = $root_ar[0];
$parentdir = SQLite3::escapeString($root_id);
$temp_id = $root_id;