diff options
| author | root | 2014-03-26 23:51:57 +0100 |
|---|---|---|
| committer | root | 2014-03-26 23:51:57 +0100 |
| commit | 43933b5939b329a4ab333b093a370dabe995e0ad (patch) | |
| tree | 2a91a58038943a8998776edaf33ab003860c7b6f /www/functions | |
| parent | cb74ce9e9702677225102fc06b5adda8ce692cdc (diff) | |
| download | files.iamfabulous.de-43933b5939b329a4ab333b093a370dabe995e0ad.tar.gz | |
Small changes.
Diffstat (limited to 'www/functions')
| -rwxr-xr-x | www/functions/func_rewrite.php | 2 | ||||
| -rwxr-xr-x | www/functions/func_upload.php | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/www/functions/func_rewrite.php b/www/functions/func_rewrite.php index d9f694d..0a123d6 100755 --- a/www/functions/func_rewrite.php +++ b/www/functions/func_rewrite.php @@ -16,7 +16,9 @@ function rewrite($db){ } if($_SESSION["login"]){ + $scheme = $GLOBALS["scheme"]; header("Refresh: 0; ".$scheme.$_SERVER["HTTP_HOST"]."/" . $_SESSION['username'] . "/" . $_GET["name"] . "/" . $folder . ""); + exit; } return false; diff --git a/www/functions/func_upload.php b/www/functions/func_upload.php index 8059191..dd113fc 100755 --- a/www/functions/func_upload.php +++ b/www/functions/func_upload.php @@ -50,10 +50,7 @@ function upload($db){ 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; @@ -62,7 +59,7 @@ function upload($db){ $overall_size = $overall_size + $row[$count]; $count++; } - + if($overall_size > 2147483648){ // == 2GB return UPLOAD_QUOTA; } |
