Commit 7ee336c7 authored by Marius Cramer's avatar Marius Cramer
Browse files

- ported some patches

parent 75b7fc56
......@@ -83,7 +83,8 @@ if($_SESSION['s']['user']['typ'] == 'admin') {
'prefix' => "",
'suffix' => "",
'datasource' => array ( 'type' => 'SQL',
'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name',
//'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name',
'querystring' => "SELECT sys_group.groupid,CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), IF(client.contact_firstname != '', CONCAT(client.contact_firstname, ' '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as name FROM sys_group, client WHERE sys_group.groupid != 1 AND sys_group.client_id = client.client_id ORDER BY client.company_name, client.contact_name",
'keyfield'=> 'groupid',
'valuefield'=> 'name'
),
......
......@@ -83,7 +83,8 @@ if($_SESSION['s']['user']['typ'] == 'admin') {
'prefix' => "",
'suffix' => "",
'datasource' => array ( 'type' => 'SQL',
'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name',
//'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name',
'querystring' => "SELECT sys_group.groupid,CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), IF(client.contact_firstname != '', CONCAT(client.contact_firstname, ' '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as name FROM sys_group, client WHERE sys_group.groupid != 1 AND sys_group.client_id = client.client_id ORDER BY client.company_name, client.contact_name",
'keyfield'=> 'groupid',
'valuefield'=> 'name'
),
......
......@@ -70,7 +70,8 @@ if($_SESSION['s']['user']['typ'] == 'admin') {
'prefix' => "",
'suffix' => "",
'datasource' => array ( 'type' => 'SQL',
'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name',
//'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name',
'querystring' => "SELECT sys_group.groupid,CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), IF(client.contact_firstname != '', CONCAT(client.contact_firstname, ' '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as name FROM sys_group, client WHERE sys_group.groupid != 1 AND sys_group.client_id = client.client_id ORDER BY client.company_name, client.contact_name",
'keyfield'=> 'groupid',
'valuefield'=> 'name'
),
......
......@@ -91,7 +91,8 @@ if($_SESSION['s']['user']['typ'] == 'admin') {
'prefix' => "",
'suffix' => "",
'datasource' => array ( 'type' => 'SQL',
'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name',
//'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name',
'querystring' => "SELECT sys_group.groupid,CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), IF(client.contact_firstname != '', CONCAT(client.contact_firstname, ' '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as name FROM sys_group, client WHERE sys_group.groupid != 1 AND sys_group.client_id = client.client_id ORDER BY client.company_name, client.contact_name",
'keyfield'=> 'groupid',
'valuefield'=> 'name'
),
......
......@@ -88,7 +88,8 @@ if($_SESSION['s']['user']['typ'] == 'admin' && $vhostdomain_type == 'domain') {
'prefix' => "",
'suffix' => "",
'datasource' => array ( 'type' => 'SQL',
'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name',
//'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name',
'querystring' => "SELECT sys_group.groupid,CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), IF(client.contact_firstname != '', CONCAT(client.contact_firstname, ' '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as name FROM sys_group, client WHERE sys_group.groupid != 1 AND sys_group.client_id = client.client_id ORDER BY client.company_name, client.contact_name",
'keyfield'=> 'groupid',
'valuefield'=> 'name'
),
......
......@@ -9,13 +9,13 @@
<tmpl_else>
<a href="#" data-load-content="<tmpl_var name='link'>">
</tmpl_if>
<tmpl_else>
<a href="#">
</tmpl_if>
<div>
<strong><tmpl_var name="title"></strong>
</div>
<tmpl_if name="link">
</a>
</tmpl_if>
</li>
</tmpl_loop>
</ul>
......
......@@ -49,6 +49,11 @@ class cronjob_quota_notify extends cronjob {
public function onRunJob() {
global $app, $conf;
/* used for all monitor cronjobs */
$app->load('monitor_tools');
$this->_tools = new monitor_tools();
/* end global section for monitor cronjobs */
//######################################################################################################
// enforce traffic quota (run only on the "master-server")
......
......@@ -228,7 +228,7 @@ class cronjob_backup extends cronjob {
$db_name = $rec['database_name'];
$db_backup_file = 'db_'.$db_name.'_'.date('Y-m-d_H-i').'.sql';
//$command = "mysqldump -h '".escapeshellcmd($clientdb_host)."' -u '".escapeshellcmd($clientdb_user)."' -p'".escapeshellcmd($clientdb_password)."' -c --add-drop-table --create-options --quick --result-file='".$db_backup_dir.'/'.$db_backup_file."' '".$db_name."'";
$command = "mysqldump -h ".escapeshellarg($clientdb_host)." -u ".escapeshellarg($clientdb_user)." -p".escapeshellarg($clientdb_password)." -c --add-drop-table --create-options --quick --result-file='".$db_backup_dir.'/'.$db_backup_file."' '".$db_name."'";
$command = "mysqldump -h ".escapeshellarg($clientdb_host)." -u ".escapeshellarg($clientdb_user)." -p".escapeshellarg($clientdb_password)." -c --add-drop-table --create-options --quick --max_allowed_packet=512M --result-file='".$db_backup_dir.'/'.$db_backup_file."' '".$db_name."'";
exec($command, $tmp_output, $retval);
//* Compress the backup with gzip
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment