File: functions.php

package info (click to toggle)
squirrelmail 2%3A1.4.21-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 4,168 kB
  • ctags: 7,114
  • sloc: php: 35,360; perl: 3,414; sh: 162; ansic: 122; makefile: 63
file content (56 lines) | stat: -rw-r--r-- 1,317 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php

/**
 * functions.php
 *
 * Copyright (c) 1999-2010 The SquirrelMail Project Team
 * Licensed under the GNU GPL. For full terms see the file COPYING.
 *
 * This is a standard Squirrelmail-1.2 API for plugins.
 *
 * $Id: setup.php 10633 2006-02-03 22:27:56Z jervfors $
 */


/**
 * Show the button in the main bar
 */
function bug_report_button_do() {

    global $username, $data_dir, $color;

    $bug_report_visible = getPref($data_dir, $username, 'bug_report_visible');

    if (! $bug_report_visible) {
        return;
    }

    displayInternalLink('plugins/bug_report/bug_report.php', _("Bug"), '');
    echo "&nbsp;&nbsp;\n";
}


/**
 * Register bug report option block
 *
 * @since 1.4.14
 *
 * @access private
 *
 */
function bug_report_block_do() {
    global $username, $data_dir, $optpage_data, $bug_report_visible;
    $bug_report_visible = getPref($data_dir, $username, 'bug_report_visible', FALSE);
    $optpage_data['grps']['bug_report'] = _("Bug Reports");
    $optionValues = array();
    $optionValues[] = array(
        'name'    => 'bug_report_visible',
        'caption' => _("Show button in toolbar"),
        'type'    => SMOPT_TYPE_BOOLEAN,
        'refresh' => SMOPT_REFRESH_ALL,
        'initial_value' => false
        );
    $optpage_data['vals']['bug_report'] = $optionValues;
}