From 23acdfd4760881a52aaad59051615abadedb162d Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 19 Jul 2003 00:26:18 +0000 Subject: [PATCH] Allows users to modify their forum posts after they've been posted. svn path=/trunk/boinc/; revision=1742 --- html/forum/edit.php | 51 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 html/forum/edit.php diff --git a/html/forum/edit.php b/html/forum/edit.php new file mode 100644 index 0000000000..aa55e06f0d --- /dev/null +++ b/html/forum/edit.php @@ -0,0 +1,51 @@ +thread); + + $post->update($_POST['content']); + + header('Location: thread.php?id='.$thread->id); +} + +doHeader('Forum'); + +$logged_in_user = get_logged_in_user(); +$post = getPost($_GET['id']); +if ($logged_in_user->id != $post->user) { + // Can't edit other's posts. + echo "You are not authorized to edit this post."; + exit(); +} +?> + +

+ Edit Post +
Forum +

+ +

+

+ + + + + + + + + + + +
Edit Your Post
Message content
+ +
+
+

+ + \ No newline at end of file