Commit a6e3ae81 authored by Marius Cramer's avatar Marius Cramer

- fixed some syntax errors from previous commit

parent 2af58c77
......@@ -1099,9 +1099,9 @@ class installer_dist extends installer_base {
$vserver_server_enabled = ($conf['services']['vserver'])?1:0;
$sql = "UPDATE `server` SET mail_server = ?, web_server = ?, dns_server = ?, file_server = ?, db_server = ?, vserver_server = ? WHERE server_id = ?";
$this->db->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']););
$this->db->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']);
if($conf['mysql']['master_slave_setup'] == 'y') {
$this->dbmaster->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']););
$this->dbmaster->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']);
}
// chown install dir to root and chmod 755
......
......@@ -70,7 +70,7 @@ class custom_datasource {
// Get the limits of the client
$client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
$client = $app->db->queryOneRecord("SELECT default_slave_dnsserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ", $client_group_id);
$sql = "SELECT server_id,server_name FROM server WHERE server_id = ?");
$sql = "SELECT server_id,server_name FROM server WHERE server_id = ?";
} else {
$sql = "SELECT server_id,server_name FROM server WHERE dns_server = 1 ORDER BY server_name";
}
......
......@@ -629,7 +629,7 @@ class db extends mysqli
$params = array($tablename);
$v_params = array();
foreach($insert_data as $key => $val) {
$key_str .= '??,'
$key_str .= '??,';
$params[] = $key;
$val_str .= '?,';
......
......@@ -370,7 +370,7 @@ class remoting_mail extends remoting {
}
//* Save the record
if ($app->db->query("INSERT INTO `sys_remoteaction` SET `server_id` = ?, `tstamp` = ?, `action_type` = ?, `action_param` = ?, `action_state` = ?"), $server_id, $tstamp, $action_type, $primary_id, $action_state) {
if ($app->db->query("INSERT INTO `sys_remoteaction` SET `server_id` = ?, `tstamp` = ?, `action_type` = ?, `action_param` = ?, `action_state` = ?", $server_id, $tstamp, $action_type, $primary_id, $action_state)) {
return true;
} else {
return false;
......
......@@ -190,7 +190,7 @@ class validate_domain {
if($only_domain == false) {
$qrystr = "SELECT d.domain_id, IF(d.parent_domain_id != 0 AND p.domain_id IS NOT NULL, p.ip_address, d.ip_address) as `ip_address`, IF(d.parent_domain_id != 0 AND p.domain_id IS NOT NULL, p.ipv6_address, d.ipv6_address) as `ipv6_address` FROM `web_domain` as d LEFT JOIN `web_domain` as p ON (p.domain_id = d.parent_domain_id) WHERE (CONCAT(d.subdomain, '.', d.domain)= ?" . $additional_sql2 . ") AND d.server_id = ? AND d.domain_id != ?" . ($primary_id ? " AND d.parent_domain_id != ?" : "");
$params = array($domain_name) + $domain_params + array($domain['server_id'], $primary_id, $primary_id);
$checks = $app->db->queryAllRecords($qrystr, true $params);
$checks = $app->db->queryAllRecords($qrystr, true, $params);
if(is_array($checks) && !empty($checks)){
foreach($checks as $check){
if($domain['ip_address'] == '*') return false;
......
......@@ -37,7 +37,7 @@ class mail_mail_domain_plugin {
$tmp = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE default_group = ?", $client_group_id);
$client_user_id = ($tmp['userid'] > 0)?$tmp['userid']:1;
$updates .= ", sys_userid = ?";
$update_params[] = $client_user_id
$update_params[] = $client_user_id;
}
$update_params[] = $page_form->id;
$app->db->query("UPDATE mail_domain SET " . $updates . " WHERE domain_id = ?", true, $update_params);
......@@ -50,7 +50,7 @@ class mail_mail_domain_plugin {
$tmp = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE default_group = ?", $client_group_id);
$client_user_id = ($tmp['userid'] > 0)?$tmp['userid']:1;
$updates .= ", sys_userid = ?";
$update_params[] = $client_user_id
$update_params[] = $client_user_id;
}
$update_params[] = $page_form->id;
$app->db->query("UPDATE mail_domain SET " . $updates . " WHERE domain_id = ?", true, $update_params);
......
......@@ -149,7 +149,7 @@ class page_action extends tform_actions {
function onAfterInsert() {
global $app;
$domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["email_domain"])));
$domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["email_domain"]));
$app->db->query("update mail_forwarding SET sys_groupid = ? WHERE forwarding_id = ?", $domain['sys_groupid'], $this->id);
}
......
......@@ -127,7 +127,7 @@ class page_action extends tform_actions {
function onAfterInsert() {
global $app;
$domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["email_domain"])));
$domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["email_domain"]));
$app->db->query("update mail_forwarding SET sys_groupid = ? WHERE forwarding_id = ?", $domain['sys_groupid'], $this->id);
}
......
......@@ -131,7 +131,7 @@ class page_action extends tform_actions {
function onAfterInsert() {
global $app;
$domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["email_domain"])));
$domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["email_domain"]));
$app->db->query("update mail_forwarding SET sys_groupid = ? WHERE forwarding_id = ?", $domain['sys_groupid'], $this->id);
}
......
......@@ -80,8 +80,8 @@ class page_action extends tform_actions {
// The web folder user entry shall be owned by the same group as the web folder
$sys_groupid = $app->functions->intval($folder['sys_groupid']);
$sql = "UPDATE web_folder_user SET sys_groupid = ? WHERE web_folder_user_id = ?", $sys_groupid, $this->id;
$app->db->query($sql);
$sql = "UPDATE web_folder_user SET sys_groupid = ? WHERE web_folder_user_id = ?";
$app->db->query($sql, $sys_groupid, $this->id);
}
function onAfterUpdate() {
......
......@@ -60,8 +60,8 @@ class cronjob_logfiles extends cronjob {
// Manage and compress web logfiles and create traffic statistics
//######################################################################################################
$sql = "SELECT domain_id, domain, type, document_root, web_folder, parent_domain_id FROM web_domain WHERE (type = 'vhost' or type = 'vhostsubdomain' or type = 'vhostalias') AND server_id = ?", $conf['server_id'];
$records = $app->db->queryAllRecords($sql);
$sql = "SELECT domain_id, domain, type, document_root, web_folder, parent_domain_id FROM web_domain WHERE (type = 'vhost' or type = 'vhostsubdomain' or type = 'vhostalias') AND server_id = ?";
$records = $app->db->queryAllRecords($sql, $conf['server_id']);
foreach($records as $rec) {
//* create traffic statistics based on yesterdays access log file
......
......@@ -618,7 +618,7 @@ class db extends mysqli
$params = array($tablename);
$v_params = array();
foreach($insert_data as $key => $val) {
$key_str .= '??,'
$key_str .= '??,';
$params[] = $key;
$val_str .= '?,';
......
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