fsf changes, meant to be rebased on upstream
[squirrelmail.git] / plugins / bug_report / bug_report.php
CommitLineData
15e6162e 1<?php
15e6162e 2/**
3 * bug_report.php
4 *
5 * This generates the bug report data, gives information about where
6 * it will be sent to and what people will do with it, and provides
7 * a button to show the bug report mail message in order to actually
8 * send it.
9 *
c997cbe6 10 * @copyright 1999-2021 The SquirrelMail Project Team
4b4abf93 11 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
2a880038 12 * @version $Id$
ea5f4b8e 13 * @package plugins
14 * @subpackage bug_report
15e6162e 15 */
d79e01f5 16
202bcbcc 17
1a219da9 18// This is the bug_report options page
19//
20define('PAGE_NAME', 'bug_report_options');
21
22
23// Include the SquirrelMail initialization file.
24//
202bcbcc 25require('../../include/init.php');
1a219da9 26
27
28// load plugin functions
29//
202bcbcc 30require_once(SM_PATH . 'plugins/bug_report/functions.php');
2329d86d 31
1a219da9 32
876fdb60 33displayPageHeader($color);
04f6008a 34
1a219da9 35
36// error out when bug_report plugin is disabled
37// or is called by the wrong user
38//
2329d86d 39if (! is_plugin_enabled('bug_report') || ! bug_report_check_user()) {
1b858d86 40 error_box(_("Plugin is disabled."));
41 $oTemplate->display('footer.tpl');
e1df9174 42 exit();
43}
44
1a219da9 45
46// get system specs
47//
202bcbcc 48require_once(SM_PATH . 'plugins/bug_report/system_specs.php');
1a219da9 49list($body, $warnings, $corrections) = get_system_specs();
d3190325 50
2329d86d 51$body_top = "I am subscribed to the this mailing list.\n" .
52 " (applies when you are sending email to SquirrelMail mailing list)\n".
ddc94fcb 53 " [ ] True - No need to CC me when replying\n" .
54 " [ ] False - Please CC me when replying\n" .
55 "\n" .
56 "This bug occurs when I ...\n" .
57 " ... view a particular message\n" .
58 " ... use a specific plugin/function\n" .
59 " ... try to do/view/use ....\n" .
60 "\n\n\n" .
61 "The description of the bug:\n\n\n" .
62 "I can reproduce the bug by:\n\n\n" .
63 "(Optional) I got bored and found the bug occurs in:\n\n\n" .
64 "(Optional) I got really bored and here's a fix:\n\n\n" .
65 "----------------------------------------------\n\n";
d79e01f5 66
1a219da9 67$body = $body_top . $body;
15e6162e 68
1a219da9 69global $oTemplate, $bug_report_admin_email;
70if (!empty($bug_report_admin_email)) {
71 $oTemplate->assign('admin_email', $bug_report_admin_email);
72}
73$oTemplate->assign('message_body', $body);
74$oTemplate->assign('title_bg_color', $color[0]);
75$oTemplate->assign('warning_messages', $warnings);
76$oTemplate->assign('correction_messages', $corrections);
77$oTemplate->assign('warning_count', sizeof($warnings));
78$oTemplate->assign('version', SM_VERSION);
79$oTemplate->display('plugins/bug_report/usage.tpl');
80$oTemplate->display('footer.tpl');
876efbe1 81