diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2011-07-20 14:48:17 -0700 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net ; true> | 2011-07-20 14:48:17 -0700 |
commit | 0927d9e681d4e0120b15dadd3893cba60ef678e7 (patch) | |
tree | 76107e4d848632dfd478770acfb65199b162ad0b /htdocs/moderate | |
parent | fc919902e535646dd82fbf43caef5ac7be6aa0bb (diff) |
Moderators can now delete live posts. Accessing the moderate post page redirects to login if needed.
Diffstat (limited to 'htdocs/moderate')
-rw-r--r-- | htdocs/moderate/login.php | 3 | ||||
-rw-r--r-- | htdocs/moderate/moderate.php | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/htdocs/moderate/login.php b/htdocs/moderate/login.php index 92cddc1..038ce44 100644 --- a/htdocs/moderate/login.php +++ b/htdocs/moderate/login.php @@ -13,7 +13,8 @@ if (isset($_POST['login_email']) and isset($_POST['login_password'])) { if ($user and $user->authenticate($_POST['login_password'])) { $_SESSION['currentUser'] = $user; - header('Location: index.php'); + + header("Location: index.php"); } else { $error = "<div class=\"error\">Invalid Username/Password</div>"; diff --git a/htdocs/moderate/moderate.php b/htdocs/moderate/moderate.php index 29294ec..d24c5c6 100644 --- a/htdocs/moderate/moderate.php +++ b/htdocs/moderate/moderate.php @@ -34,9 +34,7 @@ if (isset($_GET['id']) and is_numeric($_GET['id'])) { break; case 'delete': - if ($_SESSION['currentUser']->isAdmin()) { - $post->delete(); - } + $post->delete(); break; } |