XHTML fixes
[squirrelmail.git] / plugins / bug_report / setup.php
index 208deea548b4e1e40df4ce19f4fb4fe474b06c4d..1c66c675939e3d51abb47e62f08fbe6257383e54 100644 (file)
@@ -3,19 +3,25 @@
 /**
  * setup.php
  *
- * Copyright (c) 1999-2003 The SquirrelMail development team
+ * 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.
  *
- * $Id$
+ * @version $Id$
+ * @package plugins
+ * @subpackage bug_report
  */
 
 /* This button fills out a form with your setup information already
    gathered -- all you have to do is type. */
 
 
-/* Initialize the bug report plugin */
+/**
+ * Initialize the bug report plugin
+ * @return void
+ * @access private
+ */
 function squirrelmail_plugin_init_bug_report() {
     global $squirrelmail_plugin_hooks;
 
@@ -26,7 +32,10 @@ function squirrelmail_plugin_init_bug_report() {
 }
 
 
-/* Show the button in the main bar */
+/**
+ * Show the button in the main bar
+ * @access private
+ */
 function bug_report_button() {
     global $color, $bug_report_visible;
 
@@ -34,26 +43,28 @@ function bug_report_button() {
         return;
     }
 
-    displayInternalLink('plugins/bug_report/bug_report.php', 'Bug', '');
+    displayInternalLink('plugins/bug_report/bug_report.php', _("Bug"), '');
     echo "  \n";
 }
 
-
+/**
+ * Saves bug report options
+ * @access private
+ */
 function bug_report_save() {
     global $username,$data_dir;
 
-    if ( !check_php_version(4,1) ) {
-        global $_POST;
-    }
-    if(isset($_POST['bug_report_bug_report_visible'])) {
+    if( sqgetGlobalVar('bug_report_bug_report_visible', $vis, SQ_POST) ) {
         setPref($data_dir, $username, 'bug_report_visible', '1');
     } else {
         setPref($data_dir, $username, 'bug_report_visible', '');
     }
 }
 
-
+/**
+ * Loads bug report options
+ * @access private
+ */
 function bug_report_load() {
     global $username, $data_dir;
     global $bug_report_visible;
@@ -61,16 +72,22 @@ function bug_report_load() {
     $bug_report_visible = getPref($data_dir, $username, 'bug_report_visible');
 }
 
-
+/**
+ * Adds bug report options to display page
+ * @access private
+ */
 function bug_report_options() {
     global $bug_report_visible;
 
-    echo '<tr><td align=right nowrap>' . _("Bug Reports:") . "</td>\n" .
-         '<td><input name="bug_report_bug_report_visible" type=CHECKBOX';
+    echo '<tr>' . html_tag('td',_("Bug Reports:"),'right','','nowrap') . "\n" .
+         '<td><input name="bug_report_bug_report_visible" type="checkbox"';
     if ($bug_report_visible) {
-        echo ' CHECKED';
+        echo ' checked="checked"';
     }
-    echo '> ' . _("Show button in toolbar") . "</td></tr>\n";
+    echo ' /> ' . _("Show button in toolbar") . "</td></tr>\n";
+
+    echo '<tr><td></td>' .
+         '<td><a href="' . SM_PATH . 'plugins/bug_report/show_system_specs.php" target="_blank"><small>' . _("Show system specs") . '</small></a></td></tr>';
 }
 
 ?>