diff options
| -rwxr-xr-x | www/functions/func_content.php | 2 | ||||
| -rwxr-xr-x | www/functions/func_upload.php | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/www/functions/func_content.php b/www/functions/func_content.php index c405715..ad0c87e 100755 --- a/www/functions/func_content.php +++ b/www/functions/func_content.php @@ -30,7 +30,7 @@ function get_content($db, $file_id, $owner){ $share =" AND share='PUBLIC'"; } - $content_db = $db->query("SELECT * FROM files WHERE parent=" . $file_id . " AND owner=" . $owner . $share . ";"); + $content_db = $db->query("SELECT * FROM files WHERE parent=" . $file_id . " AND owner=" . $owner . $share . " ORDER BY folder, name;"); $count=0; diff --git a/www/functions/func_upload.php b/www/functions/func_upload.php index c8ef93a..42a7304 100755 --- a/www/functions/func_upload.php +++ b/www/functions/func_upload.php @@ -39,10 +39,8 @@ function upload($path){ $overall_size_db = $db->query("SELECT size FROM files WHERE owner=" . $owner . " AND size > 0;"); $overall_size = 0; - $count = 0; while($row = $overall_size_db->fetchArray(SQLITE3_NUM)){ - $overall_size = $overall_size + $row[$count]; - $count++; + $overall_size = $overall_size + $row[0]; } if($overall_size > 2147483648){ // == 2GB |
