diff options
| author | Horus3 | 2014-03-17 16:25:39 +0100 |
|---|---|---|
| committer | Horus3 | 2014-03-17 16:25:39 +0100 |
| commit | aba2b5d61d707aafe8d64ccdb406c4f20b9682d6 (patch) | |
| tree | a4f656567b41bb545278c8520f3d4141c19e94a8 | |
| parent | 60c9f3fc747676b630b4ee23eae243b44e9c6285 (diff) | |
| download | files.iamfabulous.de-aba2b5d61d707aafe8d64ccdb406c4f20b9682d6.tar.gz | |
Fix: empty folder array.
| -rwxr-xr-x | www/functions/func_select.php | 7 |
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; |
