centralise the "From"-header construction in functions/identities.php.
[squirrelmail.git] / plugins / bug_report / bug_report.php
index 7bb658b6d5fc70c651006f6f613c62679c231c85..9b24726a384cd414fb9140a599f7101dfde40f65 100644 (file)
@@ -7,37 +7,34 @@
  * a button to show the bug report mail message in order to actually
  * send it.
  *
- * @copyright © 1999-2006 The SquirrelMail Project Team
+ * @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','../../');
-/** load system functions */
-require_once(SM_PATH . 'include/validate.php');
+require('../../include/init.php');
 /** load form functions */
-include_once(SM_PATH . 'functions/forms.php');
-/** load error_box() function */
-include_once(SM_PATH . 'functions/display_messages.php');
+require_once(SM_PATH . 'functions/forms.php');
 /** load plugin functions */
-include_once(SM_PATH . 'plugins/bug_report/functions.php');
+require_once(SM_PATH . 'plugins/bug_report/functions.php');
 
-displayPageHeader($color, 'None');
+displayPageHeader($color);
 
 /** 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."),$color);
-    echo "\n</body></html>\n";
+    error_box(_("Plugin is disabled."));
+    $oTemplate->display('footer.tpl');
     exit();
 }
 
 /** get system specs */
-include_once(SM_PATH . 'plugins/bug_report/system_specs.php');
+require_once(SM_PATH . 'plugins/bug_report/system_specs.php');
 global $body;
 
 $body_top = "I am subscribed to the this mailing list.\n" .
@@ -76,7 +73,7 @@ echo "</big></p>\n";
 
 echo '<ul>';
 echo '<li>';
-printf(_("Make sure that you are running the most recent copy of %s. You are currently using version %s."), '<a href="http://www.squirrelmail.org/" target="_blank">SquirrelMail</a>', $version);
+printf(_("Make sure that you are running the most recent copy of %s. You are currently using version %s."), '<a href="http://squirrelmail.org/" target="_blank">SquirrelMail</a>', $version);
 echo "</li>\n";
 
 echo '<li>';
@@ -107,7 +104,7 @@ echo "</p>\n";
             <?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    
+                // 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>';
             }
@@ -134,4 +131,4 @@ echo addSubmit(_("Start Bug Report Form"));
     </form>
     <br />
   </body>
-</html>
\ No newline at end of file
+</html>