$custommod->execute(intval($mybb->input['action']), $tids);
     $lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']);
     log_moderator_action($modlogdata, $lang->custom_tool);
     if ($mybb->input['inlinetype'] == 'search') {
         clearinline($mybb->input['searchid'], 'search');
         $lang->redirect_customtool_search = $lang->sprintf($lang->redirect_customtool_search, $tool['name']);
         $return_url = htmlspecialchars_uni($mybb->input['url']);
         redirect($return_url, $lang->redirect_customtool_search);
     } else {
         clearinline($fid, "forum");
         $lang->redirect_customtool_forum = $lang->sprintf($lang->redirect_customtool_forum, $tool['name']);
         redirect(get_forum_link($fid), $lang->redirect_customtool_forum);
     }
     break;
 } elseif ($tool['type'] == 't' && $mybb->input['modtype'] == 'thread') {
     if (!is_moderator_by_tids($tid)) {
         error_no_permission();
     }
     $thread_options = unserialize($tool['threadoptions']);
     if ($thread_options['movethread'] && $forum_cache[$thread_options['movethread']]['type'] != "f") {
         error($lang->error_movetocategory);
     }
     $ret = $custommod->execute(intval($mybb->input['action']), $tid);
     $lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']);
     log_moderator_action($modlogdata, $lang->custom_tool);
     if ($ret == 'forum') {
         $lang->redirect_customtool_forum = $lang->sprintf($lang->redirect_customtool_forum, $tool['name']);
         moderation_redirect(get_forum_link($fid), $lang->redirect_customtool_forum);
     } else {
         $lang->redirect_customtool_thread = $lang->sprintf($lang->redirect_customtool_thread, $tool['name']);
         moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_customtool_thread);
Example #2
0
     $custommod->execute($mybb->get_input('action', MyBB::INPUT_INT), $tids);
     $lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']);
     log_moderator_action($modlogdata, $lang->custom_tool);
     if ($mybb->get_input('inlinetype') == 'search') {
         clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
         $lang->redirect_customtool_search = $lang->sprintf($lang->redirect_customtool_search, $tool['name']);
         $return_url = htmlspecialchars_uni($mybb->get_input('url'));
         redirect($return_url, $lang->redirect_customtool_search);
     } else {
         clearinline($fid, "forum");
         $lang->redirect_customtool_forum = $lang->sprintf($lang->redirect_customtool_forum, $tool['name']);
         redirect(get_forum_link($fid), $lang->redirect_customtool_forum);
     }
     break;
 } elseif ($tool['type'] == 't' && $mybb->get_input('modtype') == 'thread') {
     if (!is_moderator_by_tids($tid, "canusecustomtools")) {
         error_no_permission();
     }
     $thread_options = my_unserialize($tool['threadoptions']);
     if ($thread_options['movethread'] && $forum_cache[$thread_options['movethread']]['type'] != "f") {
         error($lang->error_movetocategory);
     }
     $ret = $custommod->execute($mybb->get_input('action', MyBB::INPUT_INT), $tid);
     $lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']);
     log_moderator_action($modlogdata, $lang->custom_tool);
     if ($ret == 'forum') {
         $lang->redirect_customtool_forum = $lang->sprintf($lang->redirect_customtool_forum, $tool['name']);
         moderation_redirect(get_forum_link($fid), $lang->redirect_customtool_forum);
     } else {
         $lang->redirect_customtool_thread = $lang->sprintf($lang->redirect_customtool_thread, $tool['name']);
         moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_customtool_thread);