diff options
| author | oweissbarth | 2014-03-17 20:44:55 +0100 |
|---|---|---|
| committer | oweissbarth | 2014-03-17 20:44:55 +0100 |
| commit | ac5891a49fe76808195f0e7bb9856e98ac1aed5a (patch) | |
| tree | a1df3f9f1b3270fd233714a29964eec6694ed503 /www/functions | |
| parent | 3027a0481cb7295e42dbae01577032cbb98134bc (diff) | |
| download | files.iamfabulous.de-ac5891a49fe76808195f0e7bb9856e98ac1aed5a.tar.gz | |
Added directory creation to the browser and fixed all the bugs in func_folder
Diffstat (limited to 'www/functions')
| -rw-r--r-- | www/functions/func_folder.php | 4 | ||||
| -rwxr-xr-x | www/functions/func_interface.php | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/www/functions/func_folder.php b/www/functions/func_folder.php index 145f14a..376cdd6 100644 --- a/www/functions/func_folder.php +++ b/www/functions/func_folder.php @@ -10,7 +10,7 @@ function create_folder($path, $new_folder_name, $share){ $file_id = select_file_id($db, $_SESSION["userid"], $path); - $owner_db = $db->query("SELECT owner FROM files WHERE id=" . SQLite3::escapeString('$file_id') . ";"); + $owner_db = $db->query("SELECT owner FROM files WHERE id=" . SQLite3::escapeString($file_id) . ";"); $owner_ar = $owner_db->fetchArray(SQLITE3_NUM); if($owner_ar[0] != $_SESSION["userid"]){ @@ -19,7 +19,7 @@ function create_folder($path, $new_folder_name, $share){ if($db->exec(" BEGIN TRANSACTION; - INSERT INTO files (id, parent, owner, name, folder, size, share, hash) VALUES (Null, " . $file_id . ", " . $_SESSION['userid'] . ", " . SQLite3::escapeString('$new_folder_name') . ", 'DIRECTORY', 0, " . SQLite3::escapeString('$share') . ", ''); + INSERT INTO files (id, parent, owner, name, folder, size, share, hash) VALUES (Null, " . $file_id . ", " . $_SESSION['userid'] . ", '" . SQLite3::escapeString($new_folder_name) . "', 'DIRECTORY', 0, '" . SQLite3::escapeString($share) . "', ''); COMMIT; ")){ return MKDIR_SUCCESS; diff --git a/www/functions/func_interface.php b/www/functions/func_interface.php index e6aa3f1..e5e4729 100755 --- a/www/functions/func_interface.php +++ b/www/functions/func_interface.php @@ -11,9 +11,9 @@ function collect_content($db,$username, $folder_path){ $content = get_content($db, $file_id, $owner); - if(!$content){ + /*if(!$content){ failure("This folder is empty."); - } + }*/ return $content; } |
