aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php/database.php1
-rw-r--r--php/register.php1
-rw-r--r--php/upload.php4
3 files changed, 4 insertions, 2 deletions
diff --git a/php/database.php b/php/database.php
index 0c5f9a8..f9b672d 100644
--- a/php/database.php
+++ b/php/database.php
@@ -242,6 +242,7 @@ require_once "node.php";
nodes.node_id=node_access.node_id
where nodes.node_id=:dir_id
");
+ $dir_prep->bindParam(':dir_id',$dir_id);
if($dir_prep->execute()==false)
{
error_log("could not exedude dir sql statement in create_file_node");
diff --git a/php/register.php b/php/register.php
index 1d31a91..c314856 100644
--- a/php/register.php
+++ b/php/register.php
@@ -32,7 +32,6 @@ if($database->register_user($username,$password,$email))
}
-$_SESSION['username'] = $username;
header('Location: /');
?>
diff --git a/php/upload.php b/php/upload.php
index 55ff4a4..b36a0f1 100644
--- a/php/upload.php
+++ b/php/upload.php
@@ -2,6 +2,7 @@
require_once "database.php";
require_once "configuration.php";
+session_start();
echo 1;
if (!isset( $_POST["filename"]) || !isset($_FILES["the_file"]))
{
@@ -13,10 +14,11 @@ echo 2;
$file=$_FILES["the_file"];
$filename=$_POST["filename"];
+$homedir=$_SESSION['user_object'];
echo 3;
-$codename=$database->create_file_node($filename);
+$codename=$database->create_file_node($filename,"",$_SESSION['user_object']->home_directory);
echo $codename;
if($codename=="error")
{