diff options
-rw-r--r-- | php/logout.php | 3 | ||||
-rw-r--r-- | php/mkdir.php | 1 | ||||
-rw-r--r-- | php/share.php | 5 | ||||
-rw-r--r-- | php/upload.php | 3 |
4 files changed, 8 insertions, 4 deletions
diff --git a/php/logout.php b/php/logout.php index d37b0a0..37304d7 100644 --- a/php/logout.php +++ b/php/logout.php @@ -5,6 +5,7 @@ // which will log the user out of our webpage session_start(); -unset($_SESSION['user_object']); +//unset($_SESSION['user_object']); +session_destroy(); header('Location: /'); ?> diff --git a/php/mkdir.php b/php/mkdir.php index cf5e8e4..def17b7 100644 --- a/php/mkdir.php +++ b/php/mkdir.php @@ -8,6 +8,7 @@ $parent_directory=$_POST['parent_directory']; $dirname=$_POST['dirname']; $user=$_SESSION['user_object']; +error_log("user is creating a directory".$user->username); create_directory($parent_directory,$dirname,"",$user); diff --git a/php/share.php b/php/share.php index 0853058..aeffac4 100644 --- a/php/share.php +++ b/php/share.php @@ -2,6 +2,7 @@ require_once "configuration.php"; require_once "database.php"; require_once "user.php"; + session_start(); $user=$_SESSION['user_object']; @@ -32,8 +33,8 @@ if($_SERVER["REQUEST_METHOD"] == "POST") exit(1); } - //$share_link=create_share_link($path,$filename,$password,$user,$can_read,$can_write); - $share_link=create_share_link($path,$filename,$password,$user,true,true); + $share_link=create_share_link($path,$filename,$password,$user,$can_read,$can_write); + //$share_link=create_share_link($path,$filename,$password,$user,true,true); if($share_link==NULL) diff --git a/php/upload.php b/php/upload.php index 9739744..97fbf2f 100644 --- a/php/upload.php +++ b/php/upload.php @@ -2,9 +2,10 @@ require_once "database.php"; require_once "configuration.php"; require_once "file_type_recogniser.php"; +require_once "user.php"; require_once "node.php"; - session_start(); + if (!isset( $_POST["filename"]) || !isset($_FILES["the_file"]) || !isset($_POST['parent_directory'])) { error_log("someone tried to upload something impropperly"); |