From 741a08915729ee967af606a416640246e03a997f Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Wed, 31 Jan 2018 13:32:06 +0100 Subject: [PATCH 1/6] Remove old duplicate example, it is an old copy of sites_database_add.php --- .../examples/soap-database-add.php | 47 ------------------- 1 file changed, 47 deletions(-) delete mode 100644 remoting_client/examples/soap-database-add.php diff --git a/remoting_client/examples/soap-database-add.php b/remoting_client/examples/soap-database-add.php deleted file mode 100644 index 5ff7e4b79d..0000000000 --- a/remoting_client/examples/soap-database-add.php +++ /dev/null @@ -1,47 +0,0 @@ - $soap_location, - 'uri' => $soap_uri)); -try { - if($session_id = $client->login($username, $password)) { - echo "Logged:".$session_id."
\n"; - } - - $database_type = 'mysql'; //Only mysql type avaliable more types coming soon. - $database_name = 'yourdbname'; - $database_username = 'yourusername'; - $database_password = 'yourpassword'; - $database_charset = ''; // blank = db default, latin1 or utf8 - $database_remoteips = ''; //remote ip´s separated by commas - - $params = array( - 'server_id' => 1, - 'type' => $database_type, - 'database_name' => $database_name, - 'database_user' => $database_username, - 'database_password' => $database_password, - 'database_charset' => $database_charset, - 'remote_access' => 'n', // n disabled - y enabled - 'active' => 'y', // n disabled - y enabled - 'remote_ips' => $database_remoteips - ); - - $client_id = 1; - $database_id = $client->sites_database_add($session_id, $client_id, $params); - - if($client->logout($session_id)) { - echo "Logout.
\n"; - } - - -} catch (SoapFault $e) { - die('Error: '.$e->getMessage()); -} - -?> -- GitLab From a8d1dd2194508ec6a5710fc9b0f50afacca19d6b Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sat, 17 Feb 2018 21:40:41 +0100 Subject: [PATCH 2/6] Set a descriptive name for the return vanlue of mail_user_add(); --- interface/lib/classes/remote.d/mail.inc.php | 4 ++-- remoting_client/examples/mail_user_add.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/interface/lib/classes/remote.d/mail.inc.php b/interface/lib/classes/remote.d/mail.inc.php index 25bc1e8f3f..0a1f890b96 100644 --- a/interface/lib/classes/remote.d/mail.inc.php +++ b/interface/lib/classes/remote.d/mail.inc.php @@ -219,8 +219,8 @@ class remoting_mail extends remoting { if (!isset($params['gid'])) $params['gid'] = -1; if (!isset($params['maildir_format'])) $params['maildir_format'] = 'maildir'; - $affected_rows = $this->insertQuery('../mail/form/mail_user.tform.php', $client_id, $params); - return $affected_rows; + $mailuser_id = $this->insertQuery('../mail/form/mail_user.tform.php', $client_id, $params); + return $mailuser_id; } //* Update mail user diff --git a/remoting_client/examples/mail_user_add.php b/remoting_client/examples/mail_user_add.php index 3b7d240ecc..26d942066b 100644 --- a/remoting_client/examples/mail_user_add.php +++ b/remoting_client/examples/mail_user_add.php @@ -42,9 +42,9 @@ try { 'disablesmtp' => 'n' ); - $affected_rows = $client->mail_user_add($session_id, $client_id, $params); + $mailuser_id = $client->mail_user_add($session_id, $client_id, $params); - echo "New user: ".$affected_rows."
"; + echo "New user: ".$mailuser_id."
"; if($client->logout($session_id)) { echo 'Logged out.
'; -- GitLab From b0b62599527d1bcb21e3fa40e600fa4f22ad1e01 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sat, 17 Feb 2018 21:41:58 +0100 Subject: [PATCH 3/6] fix typo --- remoting_client/readme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/remoting_client/readme b/remoting_client/readme index 1392888bc0..92af7f8240 100644 --- a/remoting_client/readme +++ b/remoting_client/readme @@ -3,8 +3,8 @@ - Remote API example files -------------------------------------------------------- -The examples folder contains a example script for every -Remote api function. The login details and URL for the +The examples folder contains an example script for every +remote api function. The login details and URL for the remote connection are defined in the file soap_config.php -------------------------------------------------------- -- GitLab From f112fd1a7cb88507655f0484f128f66a6bdfa9f9 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sat, 17 Feb 2018 21:42:12 +0100 Subject: [PATCH 4/6] correct index path --- remoting_client/readme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remoting_client/readme b/remoting_client/readme index 92af7f8240..6e2ef10e6d 100644 --- a/remoting_client/readme +++ b/remoting_client/readme @@ -11,4 +11,4 @@ remote connection are defined in the file soap_config.php - Remote API documentation -------------------------------------------------------- -The startpage of the API documentation is main.html +The startpage of the API documentation is API-docs/index.html -- GitLab From b73e97826715c3e7d38f531f435b0637d7c41e55 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Fri, 9 Mar 2018 10:14:31 +0100 Subject: [PATCH 5/6] Cleanup whitespace --- install/tpl/debian_postfix.conf.master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/tpl/debian_postfix.conf.master b/install/tpl/debian_postfix.conf.master index b7dbea6300..22a9484b13 100644 --- a/install/tpl/debian_postfix.conf.master +++ b/install/tpl/debian_postfix.conf.master @@ -14,7 +14,7 @@ smtpd_sasl_auth_enable = yes broken_sasl_auth_clients = yes smtpd_sasl_authenticated_header = yes smtpd_restriction_classes = greylisting -greylisting = check_policy_service inet:127.0.0.1:10023 +greylisting = check_policy_service inet:127.0.0.1:10023 smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination{rbl_list}, check_recipient_access mysql:{config_dir}/mysql-virtual_recipient.cf{greylisting} smtpd_use_tls = yes smtpd_tls_security_level = may -- GitLab From bf7714a52ff51df57855e4b726d0cc20cb706e3e Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Fri, 21 Sep 2018 08:51:10 +0200 Subject: [PATCH 6/6] Correct warning message --- server/cron.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/cron.php b/server/cron.php index 261abd983b..23eeaa0235 100644 --- a/server/cron.php +++ b/server/cron.php @@ -37,7 +37,7 @@ if (is_file($conf['temppath'] . $conf['fs_div'] . '.ispconfig_cron_lock')) { $pid = trim(file_get_contents($conf['temppath'] . $conf['fs_div'] . '.ispconfig_cron_lock')); if(preg_match('/^[0-9]+$/', $pid)) { if(file_exists('/proc/' . $pid)) { - if($conf['log_priority'] <= LOGLEVEL_WARN) print @date('d.m.Y-H:i').' - WARNING - There is already an instance of server.php running with pid ' . $pid . '.' . "\n"; + if($conf['log_priority'] <= LOGLEVEL_WARN) print @date('d.m.Y-H:i').' - WARNING - There is already an instance of cron.php running with pid ' . $pid . '.' . "\n"; exit; } } -- GitLab