* @subpackage bug_report */ // This is the bug_report options page // define('PAGE_NAME', 'bug_report_options'); // Include the SquirrelMail initialization file. // require '../../include/init.php'; // load plugin functions // require_once SM_PATH . 'plugins/bug_report/functions.php'; displayPageHeader($color); // error out when bug_report plugin is disabled // or is called by the wrong user // if (!is_plugin_enabled('bug_report') || !bug_report_check_user()) { error_box(_("Plugin is disabled.")); $oTemplate->display('footer.tpl'); exit; } // get system specs // require_once SM_PATH . 'plugins/bug_report/system_specs.php'; list($body, $warnings, $corrections) = get_system_specs(); $body_top = "I am subscribed to the this mailing list.\n" . " (applies when you are sending email to SquirrelMail mailing list)\n" . " [ ] True - No need to CC me when replying\n" . " [ ] False - Please CC me when replying\n" . "\n" . "This bug occurs when I ...\n" . " ... view a particular message\n" . " ... use a specific plugin/function\n" . " ... try to do/view/use ....\n" . "\n\n\n" . "The description of the bug:\n\n\n" . "I can reproduce the bug by:\n\n\n" . "(Optional) I got bored and found the bug occurs in:\n\n\n" . "(Optional) I got really bored and here's a fix:\n\n\n" . "----------------------------------------------\n\n"; $body = $body_top . $body; global $oTemplate, $bug_report_admin_email; if (!empty($bug_report_admin_email)) { $oTemplate->assign('admin_email', $bug_report_admin_email); } $oTemplate->assign('message_body', $body);
/** * Register bug report option block * * @since 1.5.1 * * @access private * */ function bug_report_block_do() { if (bug_report_check_user()) { global $username, $data_dir, $optpage_data, $bug_report_visible; $bug_report_visible = getPref($data_dir, $username, 'bug_report_visible', FALSE); $optpage_data['grps']['bug_report'] = _("Bug Reports"); $optionValues = array(); // FIXME: option needs refresh in SMOPT_REFRESH_RIGHT (menulinks are built before options are saved/loaded) $optionValues[] = array('name' => 'bug_report_visible', 'caption' => _("Show button in toolbar"), 'type' => SMOPT_TYPE_BOOLEAN, 'refresh' => SMOPT_REFRESH_ALL, 'initial_value' => false); $optpage_data['vals']['bug_report'] = $optionValues; } }