$error_msg_array[] = gettext("You must enter a title for the thread!"); $valid = false; } if (!isset($fid) || !folder_is_valid($fid)) { $error_msg_array[] = gettext("Unknown folder"); $valid = false; } if (!session::check_perm(USER_PERM_THREAD_CREATE | USER_PERM_POST_READ, $fid)) { $error_msg_array[] = gettext("You cannot create new threads in this folder"); $valid = false; } if (attachments_get_count($aid) > 0 && !session::check_perm(USER_PERM_POST_ATTACHMENTS | USER_PERM_POST_READ, $fid)) { $error_msg_array[] = gettext("You cannot post attachments in this folder. Remove attachments to continue."); $valid = false; } if (!folder_thread_type_allowed($fid, FOLDER_ALLOW_POLL_THREAD)) { $error_msg_array[] = gettext("You cannot post this thread type in that folder!"); $valid = false; } if ($valid && (!isset($poll_type) || !is_numeric($poll_type))) { $error_msg_array[] = gettext("You must provide a poll type"); $valid = false; } if ($valid && (!isset($show_results) || !is_numeric($show_results))) { $error_msg_array[] = gettext("You must provide results display type"); $valid = false; } if ($valid && (!isset($poll_vote_type) || !is_numeric($poll_vote_type))) { $error_msg_array[] = gettext("You must provide a poll vote type"); $valid = false; }
$valid = false; } } } if (isset($_POST['more'])) { if (isset($_POST['t_content']) && strlen(trim($_POST['t_content'])) > 0) { $t_content = fix_html(emoticons_strip($_POST['t_content'])); } } if (isset($_POST['emots_toggle']) || isset($_POST['sig_toggle'])) { if (isset($_POST['t_newthread'])) { if (isset($_POST['t_threadtitle']) && strlen(trim($_POST['t_threadtitle'])) > 0) { $t_threadtitle = trim($_POST['t_threadtitle']); } if (isset($_POST['t_fid']) && is_numeric($_POST['t_fid'])) { if (folder_thread_type_allowed($_POST['t_fid'], FOLDER_ALLOW_NORMAL_THREAD)) { $t_fid = $_POST['t_fid']; } else { $error_msg_array[] = gettext("You cannot post this thread type in that folder!"); $valid = false; } } } if (isset($_POST['t_content']) && strlen(trim($_POST['t_content'])) > 0) { $t_content = fix_html(emoticons_strip($_POST['t_content'])); } if (isset($_POST['t_sig'])) { $t_sig = fix_html(emoticons_strip($_POST['t_sig'])); } if (isset($_POST['emots_toggle'])) { $page_prefs = (double) $page_prefs ^ POST_EMOTICONS_DISPLAY;