summaryrefslogtreecommitdiff
path: root/www/functions/func_upload.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/functions/func_upload.php')
-rwxr-xr-xwww/functions/func_upload.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/www/functions/func_upload.php b/www/functions/func_upload.php
index 674b4cd..89bfbc0 100755
--- a/www/functions/func_upload.php
+++ b/www/functions/func_upload.php
@@ -33,10 +33,7 @@ function upload($path){
return UPLOAD_FOLDER_NOT_OWNER;
}
- $ownername = SQLite3::escapeString($_SESSION['username']);
- $owner_db = $db->query("SELECT id FROM user WHERE name='" . $ownername . "';");
- $owner_ar = $owner_db->fetchArray(SQLITE3_NUM);
- $owner = $owner_ar[0];
+ $owner = $_SESSION["userid"];
$overall_size_db = $db->query("SELECT size FROM files WHERE owner=" . $owner . " AND size > 0;");
$overall_size = 0;
@@ -45,7 +42,7 @@ function upload($path){
$overall_size = $overall_size + $row[$count];
$count++;
}
-
+
if($overall_size > 2147483648){ // == 2GB
return UPLOAD_QUOTA;
}