From 5cd1c1284ae35f8cb92eb335bbe9f70c445f4c57 Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Wed, 3 Nov 2010 06:36:22 +0000 Subject: [PATCH] - remove multiserver-stuff from trunk/ - allow admins with customer_see_all-flag to see their support-tickets too - sanitize date-stuff in install.php - fixed wrong usage of standard_error() in ticket::sendMail() - fix issue with lighttpd server.bind when IP is IPv6 --- actions/admin/settings/125.multiserver.php | 36 ------------------- admin_tickets.php | 2 +- install/install.php | 6 ++++ lib/classes/ticket/class.ticket.php | 4 +-- .../jobs/cron_tasks.inc.http.20.lighttpd.php | 3 ++ 5 files changed, 12 insertions(+), 39 deletions(-) delete mode 100644 actions/admin/settings/125.multiserver.php diff --git a/actions/admin/settings/125.multiserver.php b/actions/admin/settings/125.multiserver.php deleted file mode 100644 index f454cac1..00000000 --- a/actions/admin/settings/125.multiserver.php +++ /dev/null @@ -1,36 +0,0 @@ - (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Settings - * @version $Id$ - */ - -return array( - 'groups' => array( - 'multiserver' => array( - 'title' => $lng['admin']['multiserver'], - 'fields' => array( - 'multiserver_enabled' => array( - 'label' => $lng['multiserver']['enabled'], - 'settinggroup' => 'multiserver', - 'varname' => 'enabled', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - 'overview_option' => true, - 'disabled' => true - ) - ) - ) - ) - ); diff --git a/admin_tickets.php b/admin_tickets.php index 7d58165e..188681c8 100644 --- a/admin_tickets.php +++ b/admin_tickets.php @@ -56,7 +56,7 @@ if($page == 'tickets' $paging = new paging($userinfo, $db, TABLE_PANEL_TICKETS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']); $paging->sortfield = 'lastchange'; $paging->sortorder = 'desc'; - $result = $db->query('SELECT `main`.`id`, `main`.`customerid`, (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub` WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`, `main`.`lastchange`, `main`.`subject`, `main`.`status`, `main`.`lastreplier`, `main`.`priority` FROM `' . TABLE_PANEL_TICKETS . '` as `main` WHERE `main`.`answerto` = "0" AND `archived` = "0" AND `adminid` = "' . (int)$userinfo['adminid'] . '" ' . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit()); + $result = $db->query('SELECT `main`.`id`, `main`.`customerid`, (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub` WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`, `main`.`lastchange`, `main`.`subject`, `main`.`status`, `main`.`lastreplier`, `main`.`priority` FROM `' . TABLE_PANEL_TICKETS . '` as `main` WHERE `main`.`answerto` = "0" AND `archived` = "0" ' . ($userinfo['customers_see_all'] ? '' : ' AND `adminid` = "' . (int)$userinfo['adminid'] . '"') . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit()); $paging->setEntries($db->num_rows($result)); $sortcode = $paging->getHtmlSortCode($lng); $arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s); diff --git a/install/install.php b/install/install.php index 97cda63e..112c465a 100644 --- a/install/install.php +++ b/install/install.php @@ -22,6 +22,12 @@ * installer, (c) 1999 - 2004 phpBB Group. */ +// ensure that default timezone is set +if(function_exists("date_default_timezone_set") && function_exists("date_default_timezone_get")) +{ + @date_default_timezone_set(@date_default_timezone_get()); +} + if(file_exists('../lib/userdata.inc.php')) { /** diff --git a/lib/classes/ticket/class.ticket.php b/lib/classes/ticket/class.ticket.php index 46ef20a7..910937a9 100644 --- a/lib/classes/ticket/class.ticket.php +++ b/lib/classes/ticket/class.ticket.php @@ -320,7 +320,7 @@ class ticket if ($_mailerror) { $rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'ticket_class'), $this->db, $this->settings); $rstlog->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg); - standard_error(array('errorsendingmail', $usr['email'])); + standard_error('errorsendingmail', $usr['email']); } $mail->ClearAddresses(); @@ -348,7 +348,7 @@ class ticket if ($_mailerror) { $rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'ticket_class'), $this->db, $this->settings); $rstlog->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg); - standard_error(array('errorsendingmail', $admin['email'])); + standard_error('errorsendingmail', $admin['email']); } $mail->ClearAddresses(); diff --git a/scripts/jobs/cron_tasks.inc.http.20.lighttpd.php b/scripts/jobs/cron_tasks.inc.http.20.lighttpd.php index 47e78b1c..7ddceed9 100644 --- a/scripts/jobs/cron_tasks.inc.http.20.lighttpd.php +++ b/scripts/jobs/cron_tasks.inc.http.20.lighttpd.php @@ -77,11 +77,13 @@ class lighttpd { $ip = '[' . $row_ipsandports['ip'] . ']'; $port = $row_ipsandports['port']; + $ipv6 = 'server.use-ipv6 = "enable"'."\n"; } else { $ip = $row_ipsandports['ip']; $port = $row_ipsandports['port']; + $ipv6 = ''; } fwrite($this->debugHandler, ' lighttpd::createIpPort: creating ip/port settings for ' . $ip . ":" . $port . "\n"); @@ -99,6 +101,7 @@ class lighttpd { $this->lighttpd_data[$vhost_filename].= 'server.port = ' . $port . "\n"; $this->lighttpd_data[$vhost_filename].= 'server.bind = "' . $ip . '"' . "\n"; + $this->lighttpd_data[$vhost_filename].= $ipv6; } if($row_ipsandports['vhostcontainer'] == '1')