diff options
| author | root | 2014-03-12 19:36:11 +0100 |
|---|---|---|
| committer | root | 2014-03-12 19:36:11 +0100 |
| commit | f0a3315c79da986224a00429431ae3e5c78c9c33 (patch) | |
| tree | ab3bf9d0bee020c0bbab8b751f445c5dddfcdbf6 | |
| parent | 9c3bb2457b1d05cb0c044260cfaaaad2a9935b96 (diff) | |
| download | files.iamfabulous.de-f0a3315c79da986224a00429431ae3e5c78c9c33.tar.gz | |
merge incomming
| -rw-r--r-- | www/functions/func_select.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/www/functions/func_select.php b/www/functions/func_select.php index dc649f2..4ca9e66 100644 --- a/www/functions/func_select.php +++ b/www/functions/func_select.php @@ -1,6 +1,6 @@ <? function select($db){ - if($_SESSION["login"]){ + if($_SESSION["login"]){ // TODO: Check if loged in user really the user who does the query $share=""; } else { $share ="AND share='PUBLIC'"; @@ -28,7 +28,13 @@ function select($db){ failure("There is something seriously wrong. If you are a human you should never read this. Mail the admin please."); } $root_ar = $root_db->fetchArray(SQLITE3_NUM); + if(empty($root_ar)){ + failure("empty"); + } $root_id = $root_ar[0]; + if(!$root_id > 0){ + failure("Seems like the user doesn't want to show his tree: " . $root_id); + } $parentdir = SQLite3::escapeString($root_id); $temp_id = $root_id; |
