<?php
-
/**
* bug_report.php
*
* a button to show the bug report mail message in order to actually
* send it.
*
- * Copyright (c) 1999-2004 The SquirrelMail development team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
- * This is a standard Squirrelmail-1.2 API for plugins.
- *
+ * @copyright © 1999-2007 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package plugins
* @subpackage bug_report
*/
+
/**
- * @ignore
+ * Include the SquirrelMail initialization file.
*/
-define('SM_PATH','../../');
-
-require_once(SM_PATH . 'include/validate.php');
-
-// loading form functions
+require('../../include/init.php');
+/** load form functions */
require_once(SM_PATH . 'functions/forms.php');
+/** load plugin functions */
+require_once(SM_PATH . 'plugins/bug_report/functions.php');
displayPageHeader($color, 'None');
-include_once(SM_PATH . 'plugins/bug_report/system_specs.php');
-include_once(SM_PATH . 'plugins/bug_report/functions.php');
+/** is bug_report plugin disabled or called by 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');
global $body;
-$body_top = "I subscribe to the squirrelmail-users mailing list.\n" .
+$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" .
<?php
echo $warning_html;
+echo '<p><a href="show_system_specs.php" target="_blank">';
+echo _("Show System Specifications");
+echo "</a></p>\n\n";
echo '<p><big>';
echo _("Before you send your bug report, please make sure to check this checklist for any common problems.");
echo "</big></p>\n";
<table align="center" border="0">
<tr>
<td>
- <?php echo _("This bug involves"); ?>: <select name="send_to">
+ <?php echo _("This bug involves:")
+ .' <select name="send_to">';
+ if (! empty($bug_report_admin_email)) {
+ // if admin's email is set - add 'report to admin' option and make it default one
+ echo '<option value="' . htmlspecialchars($bug_report_admin_email) .'" selected="selected">'
+ ._("my email account") .'</option>';
+ }
+ ?>
<option value="squirrelmail-users@lists.sourceforge.net"><?php
echo _("the general program"); ?></option>
<option value="squirrelmail-plugins@lists.sourceforge.net"><?php
</table>
</form>
<br />
-<?php
-// special forms that allow searching for bugs in mailing list and bugtracker
-echo html_tag('table',
- html_tag('tr',
- html_tag('th', _("Search Mailing List Archives"), 'center', $color[0])
- ) .
- html_tag('tr',
- html_tag('td', add_gmane_form())
- ) .
- html_tag('tr',
- html_tag('td', ' <br />')
- ) .
- html_tag('tr',
- html_tag('th', _("Search SourceForge Bugtracker"), 'center', $color[0])
- ) .
- html_tag('tr',
- html_tag('td', add_sf_bug_form())
- ), 'center', '', 'width="95%"');
-?>
</body>
</html>
\ No newline at end of file