diff options
-rw-r--r-- | php/logout.php | 3 | ||||
-rw-r--r-- | php/mkdir.php | 1 | ||||
-rw-r--r-- | php/share.php | 1 | ||||
-rw-r--r-- | php/upload.php | 3 |
4 files changed, 6 insertions, 2 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 73b1c3b..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']; 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"); |