diff --git a/.gitignore b/.gitignore index c49a12edc170f56db2006f682b46e8ab5401beef..ef9abd3d60846adc46e8de0e2fdbdc02e082932f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .idea /nbproject/private/ +.vscode .phplint-cache *.swp diff --git a/docs/autoinstall_samples/autoinstall.conf_sample.php b/docs/autoinstall_samples/autoinstall.conf_sample.php index c8bf209f9fcb2d9284f2fed8b33f96091ec36496..c8c374e4f030da50d0972144ada5822bf7bd9518 100644 --- a/docs/autoinstall_samples/autoinstall.conf_sample.php +++ b/docs/autoinstall_samples/autoinstall.conf_sample.php @@ -61,7 +61,7 @@ $autoupdate['ignore_hostname_dns'] = 'n'; $autoupdate['ispconfig_postfix_ssl_symlink'] = 'y'; $autoupdate['ispconfig_pureftpd_ssl_symlink'] = 'y'; -/* These are for service-detection (defaulting to old behaviour where alle changes were automatically accepted) */ +/* These are for service-detection (defaulting to old behaviour where all changes were automatically accepted) */ $autoupdate['svc_detect_change_mail_server'] = 'yes'; // yes (default), no $autoupdate['svc_detect_change_web_server'] = 'yes'; // yes (default), no $autoupdate['svc_detect_change_dns_server'] = 'yes'; // yes (default), no diff --git a/docs/autoinstall_samples/autoinstall.ini.sample b/docs/autoinstall_samples/autoinstall.ini.sample index bf47122074f5f097e3ab5da5fb5a9cdf8770a266..9251d1eef0be0aaee23f0797381b9c2f4372c10a 100644 --- a/docs/autoinstall_samples/autoinstall.ini.sample +++ b/docs/autoinstall_samples/autoinstall.ini.sample @@ -60,7 +60,7 @@ ignore_hostname_dns=n ispconfig_postfix_ssl_symlink=y ispconfig_pureftpd_ssl_symlink=y -; These are for service-detection (defaulting to old behaviour where alle changes were automatically accepted) +; These are for service-detection (defaulting to old behaviour where all changes were automatically accepted) svc_detect_change_mail_server=yes svc_detect_change_web_server=yes svc_detect_change_dns_server=yes diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php index 78eee8c9971a7353cb0517889b16f7b2cba247ac..9ae929136bc066c6f7013470a968a65fe9547a84 100644 --- a/interface/lib/classes/db_mysql.inc.php +++ b/interface/lib/classes/db_mysql.inc.php @@ -825,12 +825,13 @@ class db return true; } - //** Deletes a record and saves the changes into the datalog + // Updates a datalog record to store an error state. public function datalogError($errormsg) { global $app; - if(isset($app->modules->current_datalog_id) && $app->modules->current_datalog_id > 0) $this->query("UPDATE sys_datalog set error = ? WHERE datalog_id = ?", $errormsg, $app->modules->current_datalog_id); - + if(isset($app->modules->current_datalog_id) && $app->modules->current_datalog_id > 0) { + $this->query("UPDATE sys_datalog set error = ? WHERE datalog_id = ?", $errormsg, $app->modules->current_datalog_id); + } return true; } @@ -844,7 +845,11 @@ class db $login = $_SESSION['s']['user']['username']; } - $result = $this->queryAllRecords("SELECT COUNT( * ) AS cnt, sys_datalog.action, sys_datalog.dbtable FROM sys_datalog, server WHERE server.server_id = sys_datalog.server_id AND sys_datalog.user = ? AND sys_datalog.datalog_id > server.updated GROUP BY sys_datalog.dbtable, sys_datalog.action", $login); + $result = $this->queryAllRecords("SELECT COUNT( * ) AS cnt, sys_datalog.action, sys_datalog.dbtable + FROM sys_datalog, server + WHERE server.server_id = sys_datalog.server_id AND sys_datalog.user = ? AND sys_datalog.datalog_id > server.updated + GROUP BY sys_datalog.dbtable, sys_datalog.action", + $login); foreach($result as $row) { if(!$row['dbtable'] || in_array($row['dbtable'], array('aps_instances', 'aps_instances_settings', 'mail_access', 'mail_content_filter'))) continue; // ignore some entries, maybe more to come $return['entries'][] = array('table' => $row['dbtable'], 'action' => $row['action'], 'count' => $row['cnt'], 'text' => $app->lng('datalog_status_' . $row['action'] . '_' . $row['dbtable'])); $return['count'] += $row['cnt']; diff --git a/interface/web/dns/lib/lang/ar_dns_slave.lng b/interface/web/dns/lib/lang/ar_dns_slave.lng index 416e3d6e722ccae2c29e3da6707d1d36eb4155b0..9e8aaa17f910bee7a6c04008ad844c294689e8ff 100644 --- a/interface/web/dns/lib/lang/ar_dns_slave.lng +++ b/interface/web/dns/lib/lang/ar_dns_slave.lng @@ -9,7 +9,7 @@ $wb['xfer_txt'] = 'Allow zone transfers to
these IPs (comma separated list $wb['server_id_error_empty'] = 'No server selected'; $wb['origin_error_empty'] = 'Zone empty.'; $wb['origin_error_unique'] = 'There is already a record for this zone.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS has a invalid format.'; $wb['eg_domain_tld'] = 'e.g. domain.tld.'; $wb['ipv4_form_txt'] = 'Separate multiple IPs with commas'; diff --git a/interface/web/dns/lib/lang/ar_dns_soa.lng b/interface/web/dns/lib/lang/ar_dns_soa.lng index 4333c3793aa1c144ce4f9da6a0d823700b6e1fa2..ae2e0221956eeed23234f86bb72ad22e4c9abfef 100644 --- a/interface/web/dns/lib/lang/ar_dns_soa.lng +++ b/interface/web/dns/lib/lang/ar_dns_soa.lng @@ -17,7 +17,7 @@ $wb['no_zone_perm'] = 'You do not have the permission to add a record to this DN $wb['server_id_error_empty'] = 'No server selected'; $wb['origin_error_empty'] = 'Zone empty.'; $wb['origin_error_unique'] = 'There is already a record for this zone.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS has a invalid format.'; $wb['mbox_error_empty'] = 'Email is empty.'; $wb['mbox_error_regex'] = 'Email format invalid.'; diff --git a/interface/web/dns/lib/lang/bg_dns_soa.lng b/interface/web/dns/lib/lang/bg_dns_soa.lng index c1e57edf8b9ffa60b9e6f7ae306a1ebeae2184d7..9e75200a6367a0043e055a1c8b7453d021ed9d90 100644 --- a/interface/web/dns/lib/lang/bg_dns_soa.lng +++ b/interface/web/dns/lib/lang/bg_dns_soa.lng @@ -17,7 +17,7 @@ $wb['no_zone_perm'] = 'Вие намате права да добавяте за $wb['server_id_error_empty'] = 'Няма избран сървър'; $wb['origin_error_empty'] = 'Зоната е празна.'; $wb['origin_error_unique'] = 'Вече има такъв запис в тази зона.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS запис ае в грешен формат.'; $wb['mbox_error_empty'] = 'Полето с емайл е празно.'; $wb['mbox_error_regex'] = 'Полето е емайл е в грешен формат.'; diff --git a/interface/web/dns/lib/lang/en_dns_slave.lng b/interface/web/dns/lib/lang/en_dns_slave.lng index 4de10b2769b14d9c8c9314ebb876d4f2e1f9a3fd..3cc0aec72c4b0056f1b63d88ee10cc645ab7a491 100644 --- a/interface/web/dns/lib/lang/en_dns_slave.lng +++ b/interface/web/dns/lib/lang/en_dns_slave.lng @@ -10,7 +10,7 @@ $wb['xfer_txt'] = 'Allow zone transfers to
these IPs (comma separated list $wb['server_id_error_empty'] = 'No server selected'; $wb['origin_error_empty'] = 'Zone empty.'; $wb['origin_error_unique'] = 'There is already a record for this zone.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS has a invalid format.'; $wb['eg_domain_tld'] = 'e.g. domain.tld.'; $wb['ipv4_form_txt'] = 'Separate multiple IPs with commas'; diff --git a/interface/web/dns/lib/lang/en_dns_soa.lng b/interface/web/dns/lib/lang/en_dns_soa.lng index a5f1adfae5cc688659c98937fcb3c7c6947fa51d..95a007fcd672a42806bbe52a5680607fed440771 100644 --- a/interface/web/dns/lib/lang/en_dns_soa.lng +++ b/interface/web/dns/lib/lang/en_dns_soa.lng @@ -20,7 +20,7 @@ $wb['no_zone_perm'] = 'You do not have the permission to add a record to this DN $wb['server_id_error_empty'] = 'No server selected'; $wb['origin_error_empty'] = 'Zone empty.'; $wb['origin_error_unique'] = 'There is already a record for this zone.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS has a invalid format.'; $wb['mbox_error_empty'] = 'Email is empty.'; $wb['mbox_error_regex'] = 'Email format invalid.'; diff --git a/interface/web/dns/lib/lang/fi_dns_slave.lng b/interface/web/dns/lib/lang/fi_dns_slave.lng index 416e3d6e722ccae2c29e3da6707d1d36eb4155b0..9e8aaa17f910bee7a6c04008ad844c294689e8ff 100644 --- a/interface/web/dns/lib/lang/fi_dns_slave.lng +++ b/interface/web/dns/lib/lang/fi_dns_slave.lng @@ -9,7 +9,7 @@ $wb['xfer_txt'] = 'Allow zone transfers to
these IPs (comma separated list $wb['server_id_error_empty'] = 'No server selected'; $wb['origin_error_empty'] = 'Zone empty.'; $wb['origin_error_unique'] = 'There is already a record for this zone.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS has a invalid format.'; $wb['eg_domain_tld'] = 'e.g. domain.tld.'; $wb['ipv4_form_txt'] = 'Separate multiple IPs with commas'; diff --git a/interface/web/dns/lib/lang/hu_dns_slave.lng b/interface/web/dns/lib/lang/hu_dns_slave.lng index 7bc27e3a51092a82de02096c4dd3d82551ad2763..64174c0fc2d3ab5302300793e70ac84d7daeeb2e 100644 --- a/interface/web/dns/lib/lang/hu_dns_slave.lng +++ b/interface/web/dns/lib/lang/hu_dns_slave.lng @@ -9,7 +9,7 @@ $wb['xfer_txt'] = 'Allow zone transfers to
these IPs (comma separated list $wb['server_id_error_empty'] = 'No server selected'; $wb['origin_error_empty'] = 'Zone empty.'; $wb['origin_error_unique'] = 'There is already a record for this zone.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS has a invalid format.'; $wb['eg_domain_tld'] = 'e.g. domain.tld.'; $wb['ipv4_form_txt'] = 'Separate multiple IPs with commas'; diff --git a/interface/web/dns/lib/lang/hu_dns_soa.lng b/interface/web/dns/lib/lang/hu_dns_soa.lng index fdabdd99c295582fdd02d1400400ab3fbd872dd9..81c730de764b73b63deae73e24a3b6d9652e71b8 100644 --- a/interface/web/dns/lib/lang/hu_dns_soa.lng +++ b/interface/web/dns/lib/lang/hu_dns_soa.lng @@ -17,7 +17,7 @@ $wb['no_zone_perm'] = 'You do not have the permission to add a record to this DN $wb['server_id_error_empty'] = 'No server selected'; $wb['origin_error_empty'] = 'Zone empty.'; $wb['origin_error_unique'] = 'There is already a record for this zone.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS has a invalid format.'; $wb['mbox_error_empty'] = 'Email is empty.'; $wb['mbox_error_regex'] = 'Email format invalid.'; diff --git a/interface/web/dns/lib/lang/ja_dns_slave.lng b/interface/web/dns/lib/lang/ja_dns_slave.lng index 416e3d6e722ccae2c29e3da6707d1d36eb4155b0..9e8aaa17f910bee7a6c04008ad844c294689e8ff 100644 --- a/interface/web/dns/lib/lang/ja_dns_slave.lng +++ b/interface/web/dns/lib/lang/ja_dns_slave.lng @@ -9,7 +9,7 @@ $wb['xfer_txt'] = 'Allow zone transfers to
these IPs (comma separated list $wb['server_id_error_empty'] = 'No server selected'; $wb['origin_error_empty'] = 'Zone empty.'; $wb['origin_error_unique'] = 'There is already a record for this zone.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS has a invalid format.'; $wb['eg_domain_tld'] = 'e.g. domain.tld.'; $wb['ipv4_form_txt'] = 'Separate multiple IPs with commas'; diff --git a/interface/web/dns/lib/lang/pt_dns_slave.lng b/interface/web/dns/lib/lang/pt_dns_slave.lng index 416e3d6e722ccae2c29e3da6707d1d36eb4155b0..9e8aaa17f910bee7a6c04008ad844c294689e8ff 100644 --- a/interface/web/dns/lib/lang/pt_dns_slave.lng +++ b/interface/web/dns/lib/lang/pt_dns_slave.lng @@ -9,7 +9,7 @@ $wb['xfer_txt'] = 'Allow zone transfers to
these IPs (comma separated list $wb['server_id_error_empty'] = 'No server selected'; $wb['origin_error_empty'] = 'Zone empty.'; $wb['origin_error_unique'] = 'There is already a record for this zone.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS has a invalid format.'; $wb['eg_domain_tld'] = 'e.g. domain.tld.'; $wb['ipv4_form_txt'] = 'Separate multiple IPs with commas'; diff --git a/interface/web/dns/lib/lang/ro_dns_slave.lng b/interface/web/dns/lib/lang/ro_dns_slave.lng index 416e3d6e722ccae2c29e3da6707d1d36eb4155b0..9e8aaa17f910bee7a6c04008ad844c294689e8ff 100644 --- a/interface/web/dns/lib/lang/ro_dns_slave.lng +++ b/interface/web/dns/lib/lang/ro_dns_slave.lng @@ -9,7 +9,7 @@ $wb['xfer_txt'] = 'Allow zone transfers to
these IPs (comma separated list $wb['server_id_error_empty'] = 'No server selected'; $wb['origin_error_empty'] = 'Zone empty.'; $wb['origin_error_unique'] = 'There is already a record for this zone.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS has a invalid format.'; $wb['eg_domain_tld'] = 'e.g. domain.tld.'; $wb['ipv4_form_txt'] = 'Separate multiple IPs with commas'; diff --git a/interface/web/dns/lib/lang/se_dns_slave.lng b/interface/web/dns/lib/lang/se_dns_slave.lng index 416e3d6e722ccae2c29e3da6707d1d36eb4155b0..9e8aaa17f910bee7a6c04008ad844c294689e8ff 100644 --- a/interface/web/dns/lib/lang/se_dns_slave.lng +++ b/interface/web/dns/lib/lang/se_dns_slave.lng @@ -9,7 +9,7 @@ $wb['xfer_txt'] = 'Allow zone transfers to
these IPs (comma separated list $wb['server_id_error_empty'] = 'No server selected'; $wb['origin_error_empty'] = 'Zone empty.'; $wb['origin_error_unique'] = 'There is already a record for this zone.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS has a invalid format.'; $wb['eg_domain_tld'] = 'e.g. domain.tld.'; $wb['ipv4_form_txt'] = 'Separate multiple IPs with commas'; diff --git a/interface/web/dns/lib/lang/sk_dns_slave.lng b/interface/web/dns/lib/lang/sk_dns_slave.lng index 416e3d6e722ccae2c29e3da6707d1d36eb4155b0..9e8aaa17f910bee7a6c04008ad844c294689e8ff 100644 --- a/interface/web/dns/lib/lang/sk_dns_slave.lng +++ b/interface/web/dns/lib/lang/sk_dns_slave.lng @@ -9,7 +9,7 @@ $wb['xfer_txt'] = 'Allow zone transfers to
these IPs (comma separated list $wb['server_id_error_empty'] = 'No server selected'; $wb['origin_error_empty'] = 'Zone empty.'; $wb['origin_error_unique'] = 'There is already a record for this zone.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS has a invalid format.'; $wb['eg_domain_tld'] = 'e.g. domain.tld.'; $wb['ipv4_form_txt'] = 'Separate multiple IPs with commas'; diff --git a/remoting_client/examples/sites_web_domain_get.php b/remoting_client/examples/sites_web_domain_get.php index 7f5b22f6ac4fe53a5815a504444c5b6167e4159f..47fe8cbd44cbf52d94b255c9ff81eb452c99893e 100644 --- a/remoting_client/examples/sites_web_domain_get.php +++ b/remoting_client/examples/sites_web_domain_get.php @@ -16,9 +16,14 @@ try { //* Set the function parameters. $domain_id = 2; + $domain_name = 'example.com'; + // Lookup by ID. $domain_record = $client->sites_web_domain_get($session_id, $domain_id); + // Lookup by name. + $domain_record = $client->sites_web_domain_get($session_id, array('domain' => $domain_name)); + print_r($domain_record); if($client->logout($session_id)) { diff --git a/server/lib/classes/db_mysql.inc.php b/server/lib/classes/db_mysql.inc.php index 3096a5b06273aa2347eaa6060688f6bc9b2059c2..f2299de343633c901842d3aa8ce1e5a9be52591d 100644 --- a/server/lib/classes/db_mysql.inc.php +++ b/server/lib/classes/db_mysql.inc.php @@ -825,12 +825,13 @@ class db return true; } - //** Deletes a record and saves the changes into the datalog + // Updates a datalog record to store an error state. public function datalogError($errormsg) { global $app; - if(isset($app->modules->current_datalog_id) && $app->modules->current_datalog_id > 0) $this->query("UPDATE sys_datalog set error = ? WHERE datalog_id = ?", $errormsg, $app->modules->current_datalog_id); - + if(isset($app->modules->current_datalog_id) && $app->modules->current_datalog_id > 0) { + $this->query("UPDATE sys_datalog set error = ? WHERE datalog_id = ?", $errormsg, $app->modules->current_datalog_id); + } return true; }