diff options
| author | root | 2014-03-20 14:17:13 +0100 |
|---|---|---|
| committer | root | 2014-03-20 14:17:13 +0100 |
| commit | fe561fa106699a0a2e8e20633efed855c33f85c6 (patch) | |
| tree | f81a0cf71304a7bfc311037206c1c5684602b459 /www/functions/func_delete.php | |
| parent | 96757d7ef1294344c2f196346b3d73a3515d7e54 (diff) | |
| download | files.iamfabulous.de-fe561fa106699a0a2e8e20633efed855c33f85c6.tar.gz | |
First test for download() and delete().
Diffstat (limited to 'www/functions/func_delete.php')
| -rw-r--r-- | www/functions/func_delete.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/www/functions/func_delete.php b/www/functions/func_delete.php index aaf6e3e..a79cd36 100644 --- a/www/functions/func_delete.php +++ b/www/functions/func_delete.php @@ -1,7 +1,7 @@ <?php /* - expected state: broken + expected state: tested; but broken */ function delete_file($user, $path){ @@ -60,7 +60,7 @@ function delete_file($user, $path){ } } - for($i=0; $<count($hash_ar); $i++){ + for($i=0; $i<count($hash_ar); $i++){ if(!unlink($uploaddir.$file_hash.".gz")){ if(!$file_hash[$i] != ""){ return DELETE_FILE_UNLINK; @@ -89,7 +89,7 @@ function delete_folder($user, $path){ $folder_id = select_file_id($db, $user, $path); - $folder_owner_db = $db->query("SELECT owner FROM files WHERE id=".$folder_id:";"); + $folder_owner_db = $db->query("SELECT owner FROM files WHERE id=".$folder_id.";"); $folder_owner_ar = $db->fetchArray(SQLITE3_NUM); if($folder_owner_ar[0] != $_SESSION["userid"]){ @@ -169,7 +169,7 @@ function delete_user($user, $password, $password_verify){ } } - for($i=0; $<count($hash_ar); $i++){ + for($i=0; $ii<count($hash_ar); $i++){ if(!unlink($uploaddir.$hash_ar[$i].".gz")){ if($hash_ar[$i] != ""){ return DELETE_USER_FILE_DELETE; |
