summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorHorus32014-03-27 01:09:06 +0100
committerHorus32014-03-27 01:09:06 +0100
commit84f44351d1f9e11d6b1421aa2de77c3414058159 (patch)
treecfd59c78c4231f2ae7bf7f5e7b428373e00d8bf4 /www
parent09b1bac5a4543cdacc67be1752d9593d58a3eee0 (diff)
downloadfiles.iamfabulous.de-84f44351d1f9e11d6b1421aa2de77c3414058159.tar.gz
Bug fixes.
Diffstat (limited to 'www')
-rw-r--r--www/functions/func_folder.php4
-rwxr-xr-xwww/setup.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/www/functions/func_folder.php b/www/functions/func_folder.php
index c511897..c911e23 100644
--- a/www/functions/func_folder.php
+++ b/www/functions/func_folder.php
@@ -1,6 +1,6 @@
<?php
-function database_mkdir($file_id, $new_folder_name, $share){
+function database_mkdir($db, $file_id, $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) . "', '');
@@ -42,7 +42,7 @@ function create_folder($path, $new_folder_name, $share){
}
}
- if(database_mkdir($file_id, $new_folder_name, $share)){
+ if(database_mkdir($db, $file_id, $new_folder_name, $share)){
return MKDIR_SUCCESS;
} else {
return MKDIR_DATABASE;
diff --git a/www/setup.php b/www/setup.php
index 93551aa..d2290c3 100755
--- a/www/setup.php
+++ b/www/setup.php
@@ -64,9 +64,9 @@ if($bool){
$_SESSION["username"] = "admin";
$_SESSION["userid"] = 1;
+ header("Refresh: 2; ".$scheme.$_SERVER["HTTP_HOST"]."/admin");
echo "Success! You will redirected any moment.";
include("include.php");
- header("Refresh: 2; ".$scheme.$_SERVER["HTTP_HOST"]."/admin");
} else {
echo "Failure! :( <br>";
echo "Your password: ".$hash_password;