$t_rpid = isset($_POST['t_rpid']) && is_numeric($_POST['t_rpid']) ? $_POST['t_rpid'] : 0; if (isset($thread_data['CLOSED']) && $thread_data['CLOSED'] > 0 && !session::check_perm(USER_PERM_FOLDER_MODERATE, $t_fid)) { html_draw_error(gettext("This thread is closed, you cannot post in it!")); } if (session::check_perm(USER_PERM_FOLDER_MODERATE, $t_fid)) { $t_closed = isset($_POST['t_closed']) && $_POST['t_closed'] == 'Y' ? true : false; $t_sticky = isset($_POST['t_sticky']) && $_POST['t_sticky'] == 'Y' ? 'Y' : 'N'; if (isset($t_closed) && $t_closed == "Y") { thread_set_closed($t_tid, true); } else { thread_set_closed($t_tid, false); } if (isset($t_sticky) && $t_sticky == "Y") { thread_set_sticky($t_tid, true); } else { thread_set_sticky($t_tid, false); } } } if ($t_tid > 0) { if ($allow_sig == true && strlen(trim($t_sig)) > 0) { $t_content .= "<div class=\"sig\">{$t_sig}</div>"; } $new_pid = post_create($t_fid, $t_tid, $t_rpid, $uid, $t_to_uid, $t_content); if ($new_pid > -1) { $user_rel = user_get_relationship($t_to_uid, $uid); if ($high_interest == "Y") { thread_set_high_interest($t_tid); } if (!session::check_perm(USER_PERM_WORMED, 0) && !($user_rel & USER_IGNORED_COMPLETELY)) { $exclude_user_array = array($t_to_uid, $uid);
} } else { if (thread_set_sticky($tid, true)) { post_add_edit_text($tid, 1); admin_add_log_entry(CREATE_THREAD_STICKY, array($tid, $thread_data['TITLE'])); } else { $error_msg_array[] = gettext("Failed to update thread sticky status"); $valid = false; } } } } else { if (isset($_POST['sticky']) && $_POST['sticky'] == "N") { $t_sticky = $_POST['sticky']; if ($t_sticky != $thread_data['STICKY']) { if (thread_set_sticky($tid, false)) { post_add_edit_text($tid, 1); admin_add_log_entry(REMOVE_THREAD_STICKY, array($tid, $thread_data['TITLE'])); } else { $error_msg_array[] = gettext("Failed to update thread sticky status"); $valid = false; } } } } if (isset($_POST['thread_merge_split']) && is_numeric($_POST['thread_merge_split'])) { if ($_POST['thread_merge_split'] == THREAD_TYPE_MERGE) { if (isset($_POST['merge_thread']) && is_numeric($_POST['merge_thread'])) { if (isset($_POST['merge_type']) && is_numeric($_POST['merge_type']) && isset($_POST['merge_thread_con']) && $_POST['merge_thread_con'] == "Y") { $error_str = ''; $merge_thread = $_POST['merge_thread'];