0fa28f2262fd3169d9e4fce63474a91ba4f1db27
6 * Copyright (c) 1999-2005 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
9 * This is a standard SquirrelMail 1.2 API for plugins.
13 * @subpackage bug_report
17 * Initialize the bug report plugin
21 function squirrelmail_plugin_init_bug_report() {
22 global $squirrelmail_plugin_hooks;
24 $squirrelmail_plugin_hooks['menuline']['bug_report'] = 'bug_report_button';
25 $squirrelmail_plugin_hooks['loading_prefs']['bug_report'] = 'bug_report_load';
26 $squirrelmail_plugin_hooks['optpage_loadhook_display']['bug_report'] = 'bug_report_block';
31 * Show the button in the main bar
34 function bug_report_button() {
35 global $bug_report_visible;
37 if (! $bug_report_visible) {
41 displayInternalLink('plugins/bug_report/bug_report.php', _("Bug"), '');
42 echo " \n";
46 * Loads bug report options
49 function bug_report_load() {
50 global $username, $data_dir;
51 global $bug_report_visible;
53 $bug_report_visible = (bool) getPref($data_dir, $username, 'bug_report_visible',false);
57 * Register bug report option block
61 function bug_report_block() {
63 $optpage_data['grps']['bug_report'] = _("Bug Reports");
64 $optionValues = array();
65 // FIXME: option needs refresh in SMOPT_REFRESH_RIGHT
66 // (menulink is processed before options are saved/loaded)
67 $optionValues[] = array(
68 'name' => 'bug_report_visible',
69 'caption' => _("Show button in toolbar"),
70 'type' => SMOPT_TYPE_BOOLEAN
,
71 'refresh' => SMOPT_REFRESH_ALL
,
72 'initial_value' => false
74 $optpage_data['vals']['bug_report'] = $optionValues;