예제 #1
0
         $_REQUEST['type'] = '';
     }
     if (!isset($_REQUEST['topic_title'])) {
         $_REQUEST['topic_title'] = '';
     }
     if (!isset($_REQUEST['in_reply_to'])) {
         $_REQUEST['in_reply_to'] = '';
     }
     if (!isset($_REQUEST['parentId'])) {
         $_REQUEST['parentId'] = $msg_info['parentId'];
     }
     if ($_REQUEST['parentId'] > 0) {
         $p_info = $commentslib->get_comment($_REQUEST['parentId']);
         $_REQUEST['topic_title'] = $p_info['title'];
     }
     $commentslib->replace_queue($_REQUEST['qId'], $_REQUEST['forumId'], 'forum' . $_REQUEST['forumId'], $_REQUEST['parentId'], $user, $_REQUEST['title'], $_REQUEST['data'], $_REQUEST['type'], $_REQUEST['topic_smiley'], $_REQUEST['summary'], $_REQUEST['topic_title'], $_REQUEST['in_reply_to']);
     if (isset($_REQUEST['saveapp'])) {
         $commentslib->approve_queued($_REQUEST['qId']);
     }
     unset($_REQUEST['qId']);
 }
 if (isset($_REQUEST['remove'])) {
     $access->check_authenticity();
     $smarty->assign('form', 'n');
     $commentslib->remove_queued($_REQUEST['qId']);
 }
 if (isset($_REQUEST['topicize'])) {
     check_ticket('forum-queue');
     $smarty->assign('form', 'n');
     // Convert to a topic
     if (!isset($_REQUEST['summary'])) {
예제 #2
0
     $parent_id = $_REQUEST["comments_grandParentId"];
 } else {
     $parent_id = $_REQUEST["comments_parentId"];
 }
 if (isset($_REQUEST["comments_reply_threadId"]) && !empty($_REQUEST["comments_reply_threadId"])) {
     $reply_info = $commentslib->get_comment($_REQUEST["comments_reply_threadId"]);
     $in_reply_to = $reply_info["message_id"];
 } else {
     $in_reply_to = '';
 }
 // Remove HTML tags and empty lines at the end of the posted comment
 $_REQUEST["comments_data"] = rtrim(strip_tags($_REQUEST["comments_data"]));
 if ($tiki_p_forum_autoapp != 'y' && ($forum_info['approval_type'] == 'queue_all' || !$user && $forum_info['approval_type'] == 'queue_anon')) {
     $smarty->assign('was_queued', 'y');
     $_REQUEST['was_queued'] = 'y';
     $qId = $commentslib->replace_queue(0, $_REQUEST['forumId'], $comments_objectId, $parent_id, $user, $_REQUEST["comments_title"], $_REQUEST["comments_data"], 'n', '', '', $thread_info['title'], $in_reply_to);
     // PROCESS ATTACHMENT HERE
     if ($qId && isset($_FILES['userfile1']) && !empty($_FILES['userfile1']['name'])) {
         if (is_uploaded_file($_FILES['userfile1']['tmp_name'])) {
             check_ticket('view-forum');
             $fp = fopen($_FILES['userfile1']['tmp_name'], "rb");
             $commentslib->add_thread_attachment($forum_info, $qId, $fp, '', $_FILES['userfile1']['name'], $_FILES['userfile1']['type'], $_FILES['userfile1']['size']);
         } else {
             $smarty->assign('msg', $tikilib->uploaded_file_error($_FILES['userfile1']['error']));
             $smarty->display("error.tpl");
             die;
         }
     }
     //END ATTACHMENT PROCESSING
 } else {
     $smarty->assign('was_queued', 'n');
예제 #3
0
 }
 if ($forum_info['topic_summary'] != 'y') {
     $_REQUEST['comment_topicsummary'] = '';
 }
 if ($forum_info['topic_smileys'] != 'y') {
     $_REQUEST['comment_topicsmiley'] = '';
 }
 if ($forum_info['forum_use_password'] != 'n' && $_REQUEST['password'] != $forum_info['forum_password']) {
     $smarty->assign('msg', tra("Wrong password. Cannot post comment"));
     $smarty->display("error.tpl");
     die;
 }
 if ($tiki_p_forum_autoapp != 'y' && ($forum_info['approval_type'] == 'queue_all' || !$user && $forum_info['approval_type'] == 'queue_anon')) {
     print "<p>queued.\n";
     $smarty->assign('was_queued', 'y');
     $qId = $commentslib->replace_queue(0, $_REQUEST['forumId'], $comments_objectId, 0, $user, $_REQUEST["comments_title"], $_REQUEST["comments_data"], $_REQUEST["comment_topictype"], $_REQUEST['comment_topicsmiley'], $_REQUEST["comment_topicsummary"], $_REQUEST["comments_title"]);
     // PROCESS ATTACHMENT HERE
     if ($qId && isset($_FILES['userfile1']) && is_uploaded_file($_FILES['userfile1']['tmp_name'])) {
         check_ticket('view-forum');
         $fp = fopen($_FILES['userfile1']['tmp_name'], "rb");
         $commentslib->add_thread_attachment($forum_info, $qId, $fp, '', $_FILES['userfile1']['name'], $_FILES['userfile1']['type'], $_FILES['userfile1']['size']);
     }
     //END ATTACHMENT PROCESSING
     // Now process attchement here (queued attachment)
 } else {
     $smarty->assign('was_queued', 'n');
     if ($_REQUEST["comments_threadId"] == 0) {
         if (!isset($_REQUEST['comment_topicsummary'])) {
             $_REQUEST['comment_topicsummary'] = '';
         }
         if (!isset($_REQUEST['comment_topicsmiley'])) {