From ef3fb016318a11bf7fafc71d124a41961b0fb34c Mon Sep 17 00:00:00 2001 From: "Janus B. Kristensen" Date: Mon, 29 Dec 2008 10:19:25 +0000 Subject: [PATCH] - Added ability to mildly force a specific title on forum posts when posting - Added ability to get a forum post title from the GET request as well as the POST request data (POST overwrites GET) svn path=/trunk/boinc/; revision=16747 --- html/user/forum_post.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/html/user/forum_post.php b/html/user/forum_post.php index 6fc168bea8..39319f4a90 100644 --- a/html/user/forum_post.php +++ b/html/user/forum_post.php @@ -35,6 +35,8 @@ $forum = BoincForum::lookup_id($forumid); check_create_thread_access($logged_in_user, $forum); $title = post_str("title", true); +if (!$title) $title = get_str("title", true); +$force_title = get_str("force_title", true); $content = post_str("content", true); $preview = post_str("preview", true); $warning = null; @@ -97,9 +99,14 @@ if ($content && !$title) { $submit_help = "
Remember to add a title"; } -row2(tra("Title").$submit_help, +if ($force_title && $title){ + row2(tra("Title"), htmlspecialchars($title).""); +} else { + row2(tra("Title").$submit_help, "" -); + ); +} + //Message row2(tra("Message").html_info().post_warning().$body_help, ""