Skip to content

Commit 652ec7d

Browse files
author
florian030
committed
Merge branch 'stable-3.1' of git.ispconfig.org:ispconfig/ispconfig3 into stable-3.1
2 parents f86d632 + 8e7ddde commit 652ec7d

File tree

8 files changed

+70
-43
lines changed

8 files changed

+70
-43
lines changed

install/lib/installer_base.lib.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,14 +225,14 @@ public function configure_database() {
225225
global $conf;
226226

227227
//* check sql-mode
228-
$check_sql_mode = $this->db->queryOneRecord("SELECT @@sql_mode");
228+
/*$check_sql_mode = $this->db->queryOneRecord("SELECT @@sql_mode");
229229
230230
if ($check_sql_mode['@@sql_mode'] != '' && $check_sql_mode['@@sql_mode'] != 'NO_ENGINE_SUBSTITUTION') {
231231
echo "Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION. Add\n\n";
232232
echo " sql-mode=\"NO_ENGINE_SUBSTITUTION\"\n\n";
233233
echo"to the mysqld-section in your mysql-config on this server and restart mysqld afterwards\n";
234234
die();
235-
}
235+
}*/
236236

237237
$unwanted_sql_plugins = array('validate_password');
238238
$sql_plugins = $this->db->queryAllRecords("SELECT plugin_name FROM information_schema.plugins WHERE plugin_status='ACTIVE' AND plugin_name IN ?", $unwanted_sql_plugins);
@@ -2093,7 +2093,12 @@ public function configure_apps_vhost() {
20932093
$content = str_replace('{fpm_socket}', $fpm_socket, $content);
20942094
$content = str_replace('{cgi_socket}', $cgi_socket, $content);
20952095

2096-
if(file_exists('/var/run/php5-fpm.sock') || file_exists('/var/run/php/php7.0-fpm.sock')){
2096+
if( file_exists('/var/run/php5-fpm.sock')
2097+
|| file_exists('/var/run/php/php7.0-fpm.sock')
2098+
|| file_exists('/var/run/php/php7.1-fpm.sock')
2099+
|| file_exists('/var/run/php/php7.2-fpm.sock')
2100+
|| file_exists('/var/run/php/php7.3-fpm.sock')
2101+
){
20972102
$use_tcp = '#';
20982103
$use_socket = '';
20992104
} else {

interface/lib/classes/remote.d/dns.inc.php

Lines changed: 44 additions & 33 deletions
Large diffs are not rendered by default.

interface/lib/classes/simplepie.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13338,7 +13338,7 @@ function date_w3cdtf($date)
1333813338
}
1333913339

1334013340
// Convert the number of seconds to an integer, taking decimals into account
13341-
$second = round($match[6] + $match[7] / pow(10, strlen($match[7])));
13341+
$second = @round($match[6] + $match[7] / @pow(10, strlen($match[7])));
1334213342

1334313343
return gmmktime($match[4], $match[5], $second, $match[2], $match[3], $match[1]) - $timezone;
1334413344
}

interface/web/dns/dns_dmarc_edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ function onSubmit() {
287287
unset($temp);
288288
}
289289

290-
$fo_rec = '';
290+
$fo_rec = array();
291291
if (isset($this->dataRecord['dmarc_fo0'])) $fo_rec[] = '0';
292292
if (isset($this->dataRecord['dmarc_fo1'])) $fo_rec[] = '1';
293293
if (isset($this->dataRecord['dmarc_fod'])) $fo_rec[] = 'd';

server/lib/app.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ function load($classes) {
117117
2 = ERROR
118118
*/
119119

120-
function log($msg, $priority = 0) {
120+
function log($msg, $priority = 0, $dblog = true) {
121121

122122
global $conf;
123123

@@ -148,7 +148,7 @@ function log($msg, $priority = 0) {
148148
fclose($fp);
149149

150150
// Log to database
151-
if(isset($this->dbmaster)) {
151+
if($dblog === true && isset($this->dbmaster)) {
152152
$server_id = $conf['server_id'];
153153
$loglevel = $priority;
154154
$message = $msg;

server/lib/classes/cron.d/100-monitor_rkhunter.inc.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,13 @@ public function onRunJob() {
7272
/*
7373
* Fetch the output
7474
*/
75-
$data['output'] = shell_exec('rkhunter --update --checkall --nocolors --skip-keypress');
75+
76+
// Do not try to update rkhunter on Debian and Ubuntu, rkhunter is keept up to date with apt.
77+
if(file_exists('/etc/debian_version')) {
78+
$data['output'] = shell_exec('rkhunter --checkall --nocolors --skip-keypress');
79+
} else {
80+
$data['output'] = shell_exec('rkhunter --update --checkall --nocolors --skip-keypress');
81+
}
7682

7783
/*
7884
* At this moment, there is no state (maybe later)

server/lib/classes/db_mysql.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ private function _sqlerror($sErrormsg = 'Unbekannter Fehler', $sAddMsg = '', $bN
476476
if($this->show_error_messages && $conf['demo_mode'] === false) {
477477
echo $sErrormsg . $sAddMsg;
478478
} elseif(is_object($app) && method_exists($app, 'log') && $bNoLog == false) {
479-
$app->log($sErrormsg . $sAddMsg . ' -> ' . $mysql_errno . ' (' . $mysql_error . ')', LOGLEVEL_WARN);
479+
$app->log($sErrormsg . $sAddMsg . ' -> ' . $mysql_errno . ' (' . $mysql_error . ')', LOGLEVEL_WARN, false);
480480
} elseif(php_sapi_name() == 'cli') {
481481
echo $sErrormsg . $sAddMsg;
482482
}

server/plugins-available/apps_vhost_plugin.inc.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,12 @@ function update($event_name, $data) {
169169
//$content = str_replace('{fpm_port}', $web_config['php_fpm_start_port']+1, $content);
170170
$content = str_replace('{fpm_socket}', $fpm_socket, $content);
171171
$content = str_replace('{cgi_socket}', $cgi_socket, $content);
172-
if(file_exists('/var/run/php5-fpm.sock') || file_exists('/var/run/php/php7.0-fpm.sock')){
172+
if( file_exists('/var/run/php5-fpm.sock')
173+
|| file_exists('/var/run/php/php7.0-fpm.sock')
174+
|| file_exists('/var/run/php/php7.1-fpm.sock')
175+
|| file_exists('/var/run/php/php7.2-fpm.sock')
176+
|| file_exists('/var/run/php/php7.3-fpm.sock')
177+
){
173178
$use_tcp = '#';
174179
$use_socket = '';
175180
} else {

0 commit comments

Comments
 (0)