removing more ticket-stuff; update all unit-tests

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2018-12-19 19:42:50 +01:00
parent 60f1db5caf
commit 26510f0745
63 changed files with 537 additions and 1579 deletions

View File

@@ -108,8 +108,8 @@ class paging {
// entries per page and natsorting-flag are not
// passed as parameter anymore, because these are
// from the settings anyway
$entriesperpage = Settings::Get('panel.paging');
$natSorting = Settings::Get('panel.natsorting');
$entriesperpage = \Froxlor\Settings::Get('panel.paging');
$natSorting = \Froxlor\Settings::Get('panel.natsorting');
$this->userinfo = $userinfo;
@@ -216,7 +216,7 @@ class paging {
}
$this->userinfo['lastpaging']['pageno'] = $this->pageno;
$upd_stmt = Database::prepare("
$upd_stmt = \Froxlor\Database\Database::prepare("
UPDATE `" . TABLE_PANEL_SESSIONS . "` SET
`lastpaging` = :lastpaging
WHERE `hash` = :hash AND `userid` = :userid
@@ -231,7 +231,7 @@ class paging {
'ua' => $userinfo['useragent'],
'adminsession' => $userinfo['adminsession']
);
Database::pexecute($upd_stmt, $upd_data);
\Froxlor\Database\Database::pexecute($upd_stmt, $upd_data);
$this->_limit = $limit;
}
@@ -320,12 +320,12 @@ class paging {
if ($useOper == 1 && is_numeric(substr($this->searchtext, $useOper))) {
// now as we use >, < or = we use the given operator and not LIKE
$condition.= $searchfield . " ".$oper." " . Database::quote($searchtext);
$condition.= $searchfield . " ".$oper." " . \Froxlor\Database\Database::quote($searchtext);
} else {
$searchtext = str_replace('*', '%', $this->searchtext);
// append wildcards if user did not enter any
if (strpos($searchtext,'%') === false) $searchtext='%'.$searchtext.'%';
$condition.= $searchfield . " LIKE " . Database::quote($searchtext);
$condition.= $searchfield . " LIKE " . \Froxlor\Database\Database::quote($searchtext);
}
} else {

View File

@@ -38,7 +38,7 @@ return array(
'admin_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'],
'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''),
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => generatePassword(),
),
'def_language' => array(
@@ -190,7 +190,7 @@ return array(
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
'visible' => (\Froxlor\Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
'mandatory' => true,
'ul_field' => $email_quota_ul
),
@@ -201,22 +201,6 @@ return array(
'maxlength' => 9,
'ul_field' => $ftps_ul
),
'tickets' => array(
'label' => $lng['customer']['tickets'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'visible' => (Settings::Get('ticket.enabled') == '1' ? true : false),
'ul_field' => $tickets_ul
),
'tickets_see_all' => array(
'label' => $lng['admin']['tickets_see_all'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array()
),
'mysqls' => array(
'label' => $lng['customer']['mysqls'],
'type' => 'textul',

View File

@@ -47,7 +47,7 @@ return array(
'admin_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'],
'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''),
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => generatePassword(),
'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true)
),
@@ -205,7 +205,7 @@ return array(
'type' => 'textul',
'value' => $result['email_quota'],
'maxlength' => 9,
'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
'visible' => (\Froxlor\Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
'mandatory' => true,
'ul_field' => $email_quota_ul
),
@@ -216,22 +216,6 @@ return array(
'maxlength' => 9,
'ul_field' => $ftps_ul
),
'tickets' => array(
'label' => $lng['customer']['tickets'],
'type' => 'textul',
'value' => $result['tickets'],
'maxlength' => 9,
'visible' => (Settings::Get('ticket.enabled') == '1' ? true : false),
'ul_field' => $tickets_ul
),
'tickets_see_all' => array(
'label' => $lng['admin']['tickets_see_all'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array($result['tickets_see_all'])
),
'mysqls' => array(
'label' => $lng['customer']['mysqls'],
'type' => 'textul',

View File

@@ -61,7 +61,7 @@ return array(
'new_customer_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'],
'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''),
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => generatePassword()
),
'sendpassword' => array(
@@ -227,7 +227,7 @@ return array(
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
'visible' => (\Froxlor\Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
'mandatory' => true,
'ul_field' => $email_quota_ul
),
@@ -266,14 +266,6 @@ return array(
'maxlength' => 9,
'ul_field' => $ftps_ul
),
'tickets' => array(
'label' => $lng['customer']['tickets'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'visible' => (Settings::Get('ticket.enabled') == '1' ? true : false),
'ul_field' => $tickets_ul
),
'mysqls' => array(
'label' => $lng['customer']['mysqls'],
'type' => 'textul',
@@ -296,14 +288,14 @@ return array(
)
),
'allowed_phpconfigs' => array(
'visible' => (((int) Settings::Get('system.mod_fcgid') == 1 || (int) Settings::Get('phpfpm.enabled') == 1) ? true : false),
'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) ? true : false),
'label' => $lng['admin']['phpsettings']['title'],
'type' => 'checkbox',
'values' => $phpconfigs,
'value' => ((int) Settings::Get('system.mod_fcgid') == 1 ? array(
Settings::Get('system.mod_fcgid_defaultini')
) : (int) Settings::Get('phpfpm.enabled') == 1 ? array(
Settings::Get('phpfpm.defaultini')
'value' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ? array(
\Froxlor\Settings::Get('system.mod_fcgid_defaultini')
) : (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1 ? array(
\Froxlor\Settings::Get('phpfpm.defaultini')
) : array()),
'is_array' => 1
),
@@ -326,7 +318,7 @@ return array(
'value' => '1'
)
),
'visible' => (Settings::Get('system.dnsenabled') == '1' ? true : false)
'visible' => (\Froxlor\Settings::Get('system.dnsenabled') == '1' ? true : false)
),
'logviewenabled' => array(
'label' => $lng['admin']['logviewenabled'] . '?',

View File

@@ -58,7 +58,7 @@ return array(
'new_customer_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'],
'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''),
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => generatePassword(),
),
'def_language' => array(
@@ -219,7 +219,7 @@ return array(
'type' => 'textul',
'value' => $result['email_quota'],
'maxlength' => 9,
'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
'visible' => (\Froxlor\Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
'mandatory' => true,
'ul_field' => $email_quota_ul
),
@@ -248,14 +248,6 @@ return array(
'maxlength' => 9,
'ul_field' => $ftps_ul
),
'tickets' => array(
'label' => $lng['customer']['tickets'],
'type' => 'textul',
'value' => $result['tickets'],
'maxlength' => 9,
'visible' => (Settings::Get('ticket.enabled') == '1' ? true : false),
'ul_field' => $tickets_ul
),
'mysqls' => array(
'label' => $lng['customer']['mysqls'],
'type' => 'textul',
@@ -273,7 +265,7 @@ return array(
'value' => array($result['phpenabled'])
),
'allowed_phpconfigs' => array(
'visible' => (((int) Settings::Get('system.mod_fcgid') == 1 || (int) Settings::Get('phpfpm.enabled') == 1) ? true : false),
'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) ? true : false),
'label' => $lng['admin']['phpsettings']['title'],
'type' => 'checkbox',
'values' => $phpconfigs,
@@ -295,7 +287,7 @@ return array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array($result['dnsenabled']),
'visible' => (Settings::Get('system.dnsenabled') == '1' ? true : false)
'visible' => (\Froxlor\Settings::Get('system.dnsenabled') == '1' ? true : false)
),
'logviewenabled' => array(
'label' => $lng['admin']['logviewenabled'] . '?',

View File

@@ -1,44 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*
*/
return array(
'category_edit' => array(
'title' => $lng['ticket']['ticket_editcateory'],
'image' => 'icons/category_edit.png',
'sections' => array(
'section_a' => array(
'title' => $lng['ticket']['ticket_editcateory'],
'image' => 'icons/category_edit.png',
'fields' => array(
'category' => array(
'label' => $lng['ticket']['category'],
'type' => 'text',
'maxlength' => 50,
'value' => $row['name']
),
'logicalorder' => array(
'label' => $lng['ticket']['logicalorder'],
'desc' => $lng['ticket']['orderdesc'],
'type' => 'text',
'maxlength' => 3,
'value' => $row['logicalorder']
)
)
)
)
)
);

View File

@@ -1,43 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*
*/
return array(
'category_new' => array(
'title' => $lng['ticket']['ticket_newcateory'],
'image' => 'icons/category_new.png',
'sections' => array(
'section_a' => array(
'title' => $lng['ticket']['ticket_newcateory'],
'image' => 'icons/category_new.png',
'fields' => array(
'category' => array(
'label' => $lng['ticket']['category'],
'type' => 'text',
'maxlength' => 50
),
'logicalorder' => array(
'label' => $lng['ticket']['logicalorder'],
'desc' => $lng['ticket']['orderdesc'],
'type' => 'text',
'maxlength' => 3,
'value' => $order
)
)
)
)
)
);

View File

@@ -1,58 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*
*/
return array(
'ticket_new' => array(
'title' => $lng['ticket']['ticket_new'],
'image' => 'icons/ticket_new.png',
'sections' => array(
'section_a' => array(
'title' => $lng['ticket']['ticket_new'],
'image' => 'icons/ticket_new.png',
'fields' => array(
'customer' => array(
'label' => $lng['ticket']['customer'],
'type' => 'select',
'select_var' => $customers
),
'subject' => array(
'label' => $lng['ticket']['subject'],
'type' => 'text',
'maxlength' => 70
),
'priority' => array(
'label' => $lng['ticket']['priority'],
'type' => 'select',
'select_var' => $priorities
),
'category' => array(
'label' => $lng['ticket']['category'],
'type' => 'select',
'select_var' => $categories
),
'message' => array(
'style' => 'align-top',
'label' => $lng['ticket']['message'],
'type' => 'textarea',
'cols' => 60,
'rows' => 12
)
)
)
)
)
);

View File

@@ -1,54 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*
*/
return array(
'ticket_reply' => array(
'title' => $lng['ticket']['ticket_reply'],
'image' => 'icons/ticket_reply.png',
'sections' => array(
'section_a' => array(
'visible' => ($isclosed == 0 ? true : false),
'title' => $lng['ticket']['ticket_reply'],
'image' => 'icons/ticket_reply.png',
'fields' => array(
'subject' => array(
'label' => $lng['ticket']['subject'],
'type' => 'text',
'value' => 'Re: '.$subject
),
'priority' => array(
'label' => $lng['ticket']['priority'],
'type' => 'select',
'select_var' => $priorities
),
'category' => array(
'label' => $lng['ticket']['category'],
'type' => 'label',
'value' => htmlentities($row['name']),
),
'message' => array(
'style' => 'align-top',
'label' => $lng['ticket']['message'],
'type' => 'textarea',
'cols' => 60,
'rows' => 12
)
)
)
)
)
);

View File

@@ -1,50 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*/
return array(
'ticket_add' => array(
'title' => $lng['ticket']['ticket_new'],
'image' => 'icons/ticket_add.png',
'sections' => array(
'section_a' => array(
'title' => $lng['ticket']['ticket_new'],
'image' => 'icons/ticket_add.png',
'fields' => array(
'subject' => array(
'label' => $lng['ticket']['subject'],
'type' => 'text',
),
'priority' => array(
'label' => $lng['ticket']['priority'],
'type' => 'select',
'select_var' => $priorities,
),
'category' => array(
'label' => $lng['ticket']['category'],
'type' => 'select',
'select_var' => $categories,
),
'message' => array(
'label' => $lng['ticket']['message'],
'type' => 'textarea',
'rows' => 12,
'cols' => 60,
)
)
)
)
)
);

View File

@@ -1,51 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*/
return array(
'ticket_reply' => array(
'title' => $lng['ticket']['ticket_reply'],
'image' => 'icons/ticket_reply.png',
'sections' => array(
'section_a' => array(
'title' => $lng['ticket']['ticket_reply'],
'image' => 'icons/ticket_reply.png',
'fields' => array(
'subject' => array(
'label' => $lng['ticket']['subject'],
'type' => 'text',
'value' => "Re: $subject",
),
'priority' => array(
'label' => $lng['ticket']['priority'],
'type' => 'select',
'select_var' => $priorities,
),
'category' => array(
'label' => $lng['ticket']['category'],
'type' => 'label',
'value' => $row['name'],
),
'message' => array(
'label' => $lng['ticket']['message'],
'type' => 'textarea',
'rows' => 12,
'cols' => 60,
),
)
)
)
)
);

View File

@@ -17,6 +17,8 @@
*
*/
use \Froxlor\Database\Database;
/**
* Function which updates all counters of used ressources in panel_admins and panel_customers
* @param bool Set to true to get an array with debug information
@@ -53,7 +55,7 @@ function updateCounters($returndebuginfo = false) {
_addResourceCountEx($admin_resources[$cur_adm], $customer, 'diskspace_used', 'diskspace');
_addResourceCountEx($admin_resources[$cur_adm], $customer, 'traffic_used', 'traffic_used'); // !!! yes, USED and USED
foreach (array('mysqls', 'ftps', 'emails', 'email_accounts', 'tickets', 'email_forwarders', 'email_quota', 'subdomains') as $field) {
foreach (array('mysqls', 'ftps', 'emails', 'email_accounts', 'email_forwarders', 'email_quota', 'subdomains') as $field) {
_addResourceCount($admin_resources[$cur_adm], $customer, $field.'_used', $field);
}
@@ -95,10 +97,6 @@ function updateCounters($returndebuginfo = false) {
$customer_ftps = Database::pexecute_first($customer_ftps_stmt, array("cid" => $customer['customerid']));
$customer['ftps_used_new'] = ((int)$customer_ftps['number_ftps'] - 1);
$customer_tickets_stmt = Database::prepare('SELECT COUNT(*) AS `number_tickets` FROM `' . TABLE_PANEL_TICKETS . '` WHERE `answerto` = "0" AND `customerid` = :cid');
$customer_tickets = Database::pexecute_first($customer_tickets_stmt, array("cid" => $customer['customerid']));
$customer['tickets_used_new'] = (int)$customer_tickets['number_tickets'];
$customer_subdomains_stmt = Database::prepare('SELECT COUNT(*) AS `number_subdomains` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `customerid` = :cid AND `parentdomainid` <> "0"');
$customer_subdomains = Database::pexecute_first($customer_subdomains_stmt, array("cid" => $customer['customerid']));
$customer['subdomains_used_new'] = (int)$customer_subdomains['number_subdomains'];
@@ -114,7 +112,6 @@ function updateCounters($returndebuginfo = false) {
`email_forwarders_used` = :email_forwarders_used,
`email_quota_used` = :email_quota_used,
`ftps_used` = :ftps_used,
`tickets_used` = :tickets_used,
`subdomains_used` = :subdomains_used
WHERE `customerid` = :cid'
);
@@ -125,7 +122,6 @@ function updateCounters($returndebuginfo = false) {
"email_forwarders_used" => $customer['email_forwarders_used_new'],
"email_quota_used" => $customer['email_quota_used_new'],
"ftps_used" => $customer['ftps_used_new'],
"tickets_used" => $customer['tickets_used_new'],
"subdomains_used" => $customer['subdomains_used_new'],
"cid" => $customer['customerid']
);
@@ -155,7 +151,7 @@ function updateCounters($returndebuginfo = false) {
$admin_resources[$cur_adm] = array();
}
foreach (array('diskspace_used', 'traffic_used', 'mysqls_used', 'ftps_used', 'emails_used', 'email_accounts_used', 'tickets_used', 'email_forwarders_used', 'email_quota_used', 'subdomains_used') as $field) {
foreach (array('diskspace_used', 'traffic_used', 'mysqls_used', 'ftps_used', 'emails_used', 'email_accounts_used', 'email_forwarders_used', 'email_quota_used', 'subdomains_used') as $field) {
_initArrField($field, $admin_resources[$cur_adm], 0);
$admin[$field.'_new'] = $admin_resources[$cur_adm][$field];
}
@@ -170,7 +166,6 @@ function updateCounters($returndebuginfo = false) {
`email_forwarders_used` = :email_forwarders_used,
`email_quota_used` = :email_quota_used,
`ftps_used` = :ftps_used,
`tickets_used` = :tickets_used,
`subdomains_used` = :subdomains_used,
`traffic_used` = :traffic_used
WHERE `adminid` = :aid'
@@ -186,7 +181,6 @@ function updateCounters($returndebuginfo = false) {
"email_forwarders_used" => $admin['email_forwarders_used_new'],
"email_quota_used" => $admin['email_quota_used_new'],
"ftps_used" => $admin['ftps_used_new'],
"tickets_used" => $admin['tickets_used_new'],
"subdomains_used" => $admin['subdomains_used_new'],
"traffic_used" => $admin['traffic_used_new'],
"aid" => $admin['adminid']

View File

@@ -36,17 +36,17 @@ return array(
array(
'url' => 'customer_index.php?page=change_theme',
'label' => $lng['menue']['main']['changetheme'],
'show_element' => (Settings::Get('panel.allow_theme_change_customer') == true)
'show_element' => (\Froxlor\Settings::Get('panel.allow_theme_change_customer') == true)
),
array(
'url' => 'customer_index.php?page=apikeys',
'label' => $lng['menue']['main']['apikeys'],
'show_element' => (Settings::Get('api.enabled') == true)
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
),
array(
'url' => 'customer_index.php?page=apihelp',
'label' => $lng['menue']['main']['apihelp'],
'show_element' => (Settings::Get('api.enabled') == true)
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
),
array(
'url' => 'customer_index.php?action=logout',
@@ -57,7 +57,7 @@ return array(
'email' => array(
'url' => 'customer_email.php',
'label' => $lng['menue']['email']['email'],
'show_element' => (! Settings::IsInList('panel.customer_hide_options', 'email')),
'show_element' => (! \Froxlor\Settings::IsInList('panel.customer_hide_options', 'email')),
'elements' => array(
array(
'url' => 'customer_email.php?page=emails',
@@ -70,18 +70,18 @@ return array(
'required_resources' => 'emails'
),
array(
'url' => Settings::Get('panel.webmail_url'),
'url' => \Froxlor\Settings::Get('panel.webmail_url'),
'new_window' => true,
'label' => $lng['menue']['email']['webmail'],
'required_resources' => 'emails_used',
'show_element' => (Settings::Get('panel.webmail_url') != '')
'show_element' => (\Froxlor\Settings::Get('panel.webmail_url') != '')
)
)
),
'mysql' => array(
'url' => 'customer_mysql.php',
'label' => $lng['menue']['mysql']['mysql'],
'show_element' => (! Settings::IsInList('panel.customer_hide_options', 'mysql')),
'show_element' => (! \Froxlor\Settings::IsInList('panel.customer_hide_options', 'mysql')),
'elements' => array(
array(
'url' => 'customer_mysql.php?page=mysqls',
@@ -89,18 +89,18 @@ return array(
'required_resources' => 'mysqls'
),
array(
'url' => Settings::Get('panel.phpmyadmin_url'),
'url' => \Froxlor\Settings::Get('panel.phpmyadmin_url'),
'new_window' => true,
'label' => $lng['menue']['mysql']['phpmyadmin'],
'required_resources' => 'mysqls_used',
'show_element' => (Settings::Get('panel.phpmyadmin_url') != '')
'show_element' => (\Froxlor\Settings::Get('panel.phpmyadmin_url') != '')
)
)
),
'domains' => array(
'url' => 'customer_domains.php',
'label' => $lng['menue']['domains']['domains'],
'show_element' => (! Settings::IsInList('panel.customer_hide_options', 'domains')),
'show_element' => (! \Froxlor\Settings::IsInList('panel.customer_hide_options', 'domains')),
'elements' => array(
array(
'url' => 'customer_domains.php?page=domains',
@@ -115,51 +115,51 @@ return array(
'ftp' => array(
'url' => 'customer_ftp.php',
'label' => $lng['menue']['ftp']['ftp'],
'show_element' => (! Settings::IsInList('panel.customer_hide_options', 'ftp')),
'show_element' => (! \Froxlor\Settings::IsInList('panel.customer_hide_options', 'ftp')),
'elements' => array(
array(
'url' => 'customer_ftp.php?page=accounts',
'label' => $lng['menue']['ftp']['accounts']
),
array(
'url' => Settings::Get('panel.webftp_url'),
'url' => \Froxlor\Settings::Get('panel.webftp_url'),
'new_window' => true,
'label' => $lng['menue']['ftp']['webftp'],
'show_element' => (Settings::Get('panel.webftp_url') != '')
'show_element' => (\Froxlor\Settings::Get('panel.webftp_url') != '')
)
)
),
'extras' => array(
'url' => 'customer_extras.php',
'label' => $lng['menue']['extras']['extras'],
'show_element' => (! Settings::IsInList('panel.customer_hide_options', 'extras')),
'show_element' => (! \Froxlor\Settings::IsInList('panel.customer_hide_options', 'extras')),
'elements' => array(
array(
'url' => 'customer_extras.php?page=htpasswds',
'label' => $lng['menue']['extras']['directoryprotection'],
'show_element' => (! Settings::IsInList('panel.customer_hide_options', 'extras.directoryprotection'))
'show_element' => (! \Froxlor\Settings::IsInList('panel.customer_hide_options', 'extras.directoryprotection'))
),
array(
'url' => 'customer_extras.php?page=htaccess',
'label' => $lng['menue']['extras']['pathoptions'],
'show_element' => (! Settings::IsInList('panel.customer_hide_options', 'extras.pathoptions'))
'show_element' => (! \Froxlor\Settings::IsInList('panel.customer_hide_options', 'extras.pathoptions'))
),
array(
'url' => 'customer_logger.php?page=log',
'label' => $lng['menue']['logger']['logger'],
'show_element' => (Settings::Get('logger.enabled') == true) && (! Settings::IsInList('panel.customer_hide_options', 'extras.logger'))
'show_element' => (\Froxlor\Settings::Get('logger.enabled') == true) && (! \Froxlor\Settings::IsInList('panel.customer_hide_options', 'extras.logger'))
),
array(
'url' => 'customer_extras.php?page=backup',
'label' => $lng['menue']['extras']['backup'],
'show_element' => (Settings::Get('system.backupenabled') == true) && (! Settings::IsInList('panel.customer_hide_options', 'extras.backup'))
'show_element' => (\Froxlor\Settings::Get('system.backupenabled') == true) && (! \Froxlor\Settings::IsInList('panel.customer_hide_options', 'extras.backup'))
)
)
),
'traffic' => array(
'url' => 'customer_traffic.php',
'label' => $lng['menue']['traffic']['traffic'],
'show_element' => (! Settings::IsInList('panel.customer_hide_options', 'traffic')),
'show_element' => (! \Froxlor\Settings::IsInList('panel.customer_hide_options', 'traffic')),
'elements' => array(
array(
'url' => 'customer_traffic.php?page=current',
@@ -187,17 +187,17 @@ return array(
array(
'url' => 'admin_index.php?page=change_theme',
'label' => $lng['menue']['main']['changetheme'],
'show_element' => (Settings::Get('panel.allow_theme_change_admin') == true)
'show_element' => (\Froxlor\Settings::Get('panel.allow_theme_change_admin') == true)
),
array(
'url' => 'admin_index.php?page=apikeys',
'label' => $lng['menue']['main']['apikeys'],
'show_element' => (Settings::Get('api.enabled') == true)
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
),
array(
'url' => 'admin_index.php?page=apihelp',
'label' => $lng['menue']['main']['apihelp'],
'show_element' => (Settings::Get('api.enabled') == true)
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
),
array(
'url' => 'admin_index.php?action=logout',
@@ -280,7 +280,7 @@ return array(
'url' => 'admin_logger.php?page=log',
'label' => $lng['menue']['logger']['logger'],
'required_resources' => 'change_serversettings',
'show_element' => (Settings::Get('logger.enabled') == true)
'show_element' => (\Froxlor\Settings::Get('logger.enabled') == true)
),
array(
'url' => 'admin_settings.php?page=rebuildconfigs',
@@ -297,7 +297,7 @@ return array(
'url' => 'admin_settings.php?page=wipecleartextmailpws',
'label' => $lng['admin']['wipecleartextmailpwd'],
'required_resources' => 'change_serversettings',
'show_element' => (Settings::Get('system.mailpwcleartext') == true)
'show_element' => (\Froxlor\Settings::Get('system.mailpwcleartext') == true)
)
)
),
@@ -308,13 +308,13 @@ return array(
array(
'url' => 'admin_phpsettings.php?page=overview',
'label' => $lng['menue']['phpsettings']['maintitle'],
'show_element' => (Settings::Get('system.mod_fcgid') == true || Settings::Get('phpfpm.enabled') == true)
'show_element' => (\Froxlor\Settings::Get('system.mod_fcgid') == true || \Froxlor\Settings::Get('phpfpm.enabled') == true)
),
array(
'url' => 'admin_phpsettings.php?page=fpmdaemons',
'label' => $lng['menue']['phpsettings']['fpmdaemons'],
'required_resources' => 'change_serversettings',
'show_element' => Settings::Get('phpfpm.enabled') == true
'show_element' => \Froxlor\Settings::Get('phpfpm.enabled') == true
),
array(
'url' => 'admin_settings.php?page=phpinfo',

View File

@@ -1,55 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Navigation
*
*/
return array (
'customer' => array (
'tickets' => array (
'url' => 'customer_tickets.php',
'label' => $lng['menue']['ticket']['ticket'],
'show_element' => ( Settings::Get('ticket.enabled') == true ),
'elements' => array (
array (
'url' => 'customer_tickets.php?page=tickets',
'label' => $lng['menue']['ticket']['ticket'],
),
),
),
),
'admin' => array (
'tickets' => array (
'label' => $lng['admin']['ticketsystem'],
'show_element' => ( Settings::Get('ticket.enabled') == true ),
'elements' => array (
array (
'url' => 'admin_tickets.php?page=tickets',
'label' => $lng['menue']['ticket']['ticket'],
),
array (
'url' => 'admin_tickets.php?page=archive',
'label' => $lng['menue']['ticket']['archive'],
),
array (
'url' => 'admin_tickets.php?page=categories',
'label' => $lng['menue']['ticket']['categories'],
),
),
),
),
);
?>