$vList->required(); if (!$request->valid($vList)) { exit_error($GLOBALS["Language"]->getText('global', 'error'), $GLOBALS["Language"]->getText('plugin_forumml', 'specify_list')); } else { $list_id = $request->get('list'); $project = ProjectManager::instance()->getProject($group_id); if (!$user->isMember($group_id) && ($user->isRestricted() || !mail_is_list_public($list_id) || !$project->isPublic())) { exit_error($GLOBALS["Language"]->getText('global', 'error'), $GLOBALS["Language"]->getText('include_exit', 'no_perm')); } if (!mail_is_list_active($list_id)) { exit_error($GLOBALS["Language"]->getText('global', 'error'), $GLOBALS["Language"]->getText('plugin_forumml', 'wrong_list')); } } // If the list is private, search if the current user is a member of that list. If not, permission denied $list_name = mail_get_listname_from_list_id($list_id); if (!mail_is_list_public($list_id)) { exec("{$GLOBALS['mailman_bin_dir']}/list_members " . $list_name, $members); $user = user_getemail(user_getid()); if (!in_array($user, $members)) { exit_permission_denied(); } } // Build the mail to be sent $vSrep = new Valid_WhiteList('send_reply', array('Submit')); $vSrep->required(); if ($request->valid($vSrep)) { // process the mail $ret = plugin_forumml_process_mail($p, true); if ($ret) { $GLOBALS['Response']->addFeedback('warning', $GLOBALS['Language']->getText('plugin_forumml', 'delay_redirection', array($p->getThemePath() . "/images/ic/spinner-greenie.gif", $group_id, $list_id, $topic)), CODENDI_PURIFIER_DISABLED); }
require_once dirname(__FILE__) . '/../include/ForumML_HTMLPurifier.class.php'; $plugin_manager =& PluginManager::instance(); $p =& $plugin_manager->getPluginByName('forumml'); if ($p && $plugin_manager->isPluginAvailable($p) && $p->isAllowed()) { $request =& HTTPRequest::instance(); if ($request->valid(new Valid_UInt('group_id'))) { $group_id = $request->get('group_id'); } else { $group_id = ""; } // Checks 'list' parameter if (!$request->valid(new Valid_UInt('list'))) { exit_error($GLOBALS["Language"]->getText('global', 'error'), $GLOBALS["Language"]->getText('plugin_forumml', 'specify_list')); } else { $list_id = $request->get('list'); if (!user_isloggedin() || !mail_is_list_public($list_id) && !user_ismember($group_id)) { exit_error($GLOBALS["Language"]->getText('include_exit', 'info'), $GLOBALS["Language"]->getText('include_exit', 'mail_list_no_perm')); } if (!mail_is_list_active($list_id)) { exit_error($GLOBALS["Language"]->getText('global', 'error'), $GLOBALS["Language"]->getText('plugin_forumml', 'wrong_list')); } } $message_posted = false; // If message is posted, send a mail if ($request->isPost() && $request->exist('post')) { // Checks if mail subject is empty $vSub = new Valid_String('subject'); $vSub->required(); if (!$request->valid($vSub)) { $GLOBALS['Response']->addFeedback('error', $GLOBALS['Language']->getText('plugin_forumml', 'type_subject')); } else {