diff options
| author | Horus3 | 2014-04-05 18:26:27 +0200 |
|---|---|---|
| committer | Horus3 | 2014-04-05 18:26:27 +0200 |
| commit | d8141b6e431a35eb21c24f974ed4e3da3d3e371a (patch) | |
| tree | 6896b93a1fb531f9e1056d42388e71d9fdea86b9 /www/functions | |
| parent | f4e1c90897d3d9a2f139fc604401694df273edc7 (diff) | |
| download | files.iamfabulous.de-d8141b6e431a35eb21c24f974ed4e3da3d3e371a.tar.gz | |
Output now orderd by type and name instead of creating date.
Diffstat (limited to 'www/functions')
| -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 |
