Source for file functions.php
Documentation is available at functions.php
* functions for bug_report plugin
* @copyright 2004-2020 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: functions.php 14845 2020-01-07 08:09:34Z pdontthink $
* Initializes the Bug Report plugin
* @return boolean FALSE if the plugin is not correctly configured
* or an error in its setup is found; TRUE otherwise
// Declare plugin configuration vars
include_once (SM_PATH .
'plugins/bug_report/config_default.php');
// default config was removed.
$bug_report_admin_email =
'';
$bug_report_allow_users =
false;
include_once (SM_PATH .
'config/bug_report_config.php');
include_once (SM_PATH .
'plugins/bug_report/config.php');
* Checks if user can use bug_report plugin
$auth =
($username ==
$adm['name']);
if (! empty($bug_report_admin_email) &&
$bug_report_allow_users) {
* Removes whitespace from array values
* @param string $value array value that has to be trimmed
* @param string $key array key
* @todo code reuse. create generic sm function.
function bug_report_array_trim(&$value,$key) {
* Show the button in the main bar
function bug_report_button_do() {
global $username, $data_dir;
$bug_report_visible =
getPref($data_dir, $username, 'bug_report_visible', FALSE);
global $oTemplate, $nbsp;
return array('menuline' =>
$output);
* Register bug report option block
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");
// FIXME: option needs refresh in SMOPT_REFRESH_RIGHT (menulinks are built before options are saved/loaded)
'name' =>
'bug_report_visible',
'caption' =>
_("Show button in toolbar"),
$optpage_data['vals']['bug_report'] =
$optionValues;
Documentation generated on Mon, 13 Jan 2020 04:22:33 +0100 by phpDocumentor 1.4.3