Skip to content

Commit 09a9ecb

Browse files
author
Marius Burkard
committed
Merge branch 'stable-3.1' of git.ispconfig.org:ispconfig/ispconfig3 into stable-3.1
2 parents 840f395 + b1cfd5b commit 09a9ecb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+207
-38
lines changed

install/lib/installer_base.lib.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2135,9 +2135,9 @@ public function configure_apps_vhost() {
21352135
$content = str_replace('{ssl_comment}', '#', $content);
21362136

21372137
// Fix socket path on PHP 7 systems
2138-
if(file_exists('/var/run/php/php7.0-fpm.sock')) {
2139-
$content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.0-fpm.sock', $content);
2140-
}
2138+
if(file_exists('/var/run/php/php7.0-fpm.sock')) $content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.0-fpm.sock', $content);
2139+
if(file_exists('/var/run/php/php7.1-fpm.sock')) $content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.1-fpm.sock', $content);
2140+
if(file_exists('/var/run/php/php7.2-fpm.sock')) $content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.2-fpm.sock', $content);
21412141

21422142
wf($vhost_conf_dir.'/apps.vhost', $content);
21432143

interface/lib/classes/db_mysql.inc.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,17 @@ public function __construct($prefix = '') {
7575
$this->dbNewLink = $conf[$prefix.'db_new_link'];
7676
$this->dbClientFlags = $conf[$prefix.'db_client_flags'];
7777

78-
$this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass, '', (int)$this->dbPort);
78+
$this->_iConnId = mysqli_init();
79+
$this->_iConnId->real_connect($this->dbHost, $this->dbUser, $this->dbPass, null, (int)$this->dbPort, null, $this->dbClientFlags);
7980
$try = 0;
80-
while((!is_object($this->_iConnId) || mysqli_connect_error()) && $try < 5) {
81+
while($this->_iConnId->connect_error && $try < 5) {
8182
if($try > 0) sleep(1);
8283

8384
$try++;
84-
$this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass, '', (int)$this->dbPort);
85+
$this->_iConnId->real_connect($this->dbHost, $this->dbUser, $this->dbPass, null, (int)$this->dbPort, null, $this->dbClientFlags);
8586
}
8687

87-
if(!is_object($this->_iConnId) || mysqli_connect_error()) {
88+
if($this->_iConnId->connect_error) {
8889
$this->_iConnId = null;
8990
$this->_sqlerror('Zugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible!');
9091
return false;

interface/lib/classes/remoting_lib.inc.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,9 @@ function ispconfig_sysuser_update($params, $client_id){
308308
global $app;
309309
$username = $params["username"];
310310
$clear_password = $params["password"];
311+
$language = $params['language'];
311312
$client_id = $app->functions->intval($client_id);
313+
312314
if(!isset($params['_ispconfig_pw_crypted']) || $params['_ispconfig_pw_crypted'] != 1) $password = $app->auth->crypt_password(stripslashes($clear_password));
313315
else $password = $clear_password;
314316
$params = array($username);
@@ -318,8 +320,15 @@ function ispconfig_sysuser_update($params, $client_id){
318320
} else {
319321
$pwstring ="" ;
320322
}
323+
324+
$langstring = '';
325+
if (!empty($language)) {
326+
$langstring = ', language = ?';
327+
$params[] = $language;
328+
}
329+
321330
$params[] = $client_id;
322-
$sql = "UPDATE sys_user set username = ? $pwstring WHERE client_id = ?";
331+
$sql = "UPDATE sys_user set username = ? $pwstring $langstring WHERE client_id = ?";
323332
$app->db->query($sql, true, $params);
324333
}
325334

interface/web/admin/server_config_edit.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@ function onShowEdit() {
7272
$app->tpl->setVar($record);
7373
}
7474

75+
function onShowEnd() {
76+
global $app;
77+
78+
$app->tpl->setVar('server_name', $app->functions->htmlentities($app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ? AND ((SELECT COUNT(*) FROM server) > 1)", $this->id)['server_name']));
79+
80+
parent::onShowEnd();
81+
}
82+
7583
function onUpdateSave($sql) {
7684
global $app, $conf;
7785

interface/web/admin/templates/server_config_cron_edit.htm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class='page-header'>
2-
<h1><tmpl_var name="list_head_txt"></h1>
2+
<h1><tmpl_var name="list_head_txt"> {tmpl_var name='server_name'}</h1>
33
</div>
44
<p><tmpl_var name="list_desc_txt"></p>
55

@@ -21,4 +21,4 @@ <h1><tmpl_var name="list_head_txt"></h1>
2121
<div class="clear"><div class="right">
2222
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_config_edit.php">{tmpl_var name='btn_save_txt'}</button>
2323
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_config_list.php">{tmpl_var name='btn_cancel_txt'}</button>
24-
</div></div>
24+
</div></div>

interface/web/admin/templates/server_config_dns_edit.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class='page-header'>
2-
<h1><tmpl_var name="list_head_txt"></h1>
2+
<h1><tmpl_var name="list_head_txt"> {tmpl_var name='server_name'}</h1>
33
</div>
44
<p><tmpl_var name="list_desc_txt"></p>
55

interface/web/admin/templates/server_config_fastcgi_edit.htm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class='page-header'>
2-
<h1><tmpl_var name="list_head_txt"></h1>
2+
<h1><tmpl_var name="list_head_txt"> {tmpl_var name='server_name'}</h1>
33
</div>
44
<p><tmpl_var name="list_desc_txt"></p>
55

@@ -39,4 +39,4 @@ <h1><tmpl_var name="list_head_txt"></h1>
3939
<div class="clear"><div class="right">
4040
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_config_edit.php">{tmpl_var name='btn_save_txt'}</button>
4141
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_config_list.php">{tmpl_var name='btn_cancel_txt'}</button>
42-
</div></div>
42+
</div></div>

interface/web/admin/templates/server_config_getmail_edit.htm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class='page-header'>
2-
<h1><tmpl_var name="list_head_txt"></h1>
2+
<h1><tmpl_var name="list_head_txt"> {tmpl_var name='server_name'}</h1>
33
</div>
44
<p><tmpl_var name="list_desc_txt"></p>
55

@@ -15,4 +15,4 @@ <h1><tmpl_var name="list_head_txt"></h1>
1515
<div class="clear"><div class="right">
1616
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_config_edit.php">{tmpl_var name='btn_save_txt'}</button>
1717
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_config_list.php">{tmpl_var name='btn_cancel_txt'}</button>
18-
</div></div>
18+
</div></div>

interface/web/admin/templates/server_config_jailkit_edit.htm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class='page-header'>
2-
<h1><tmpl_var name="list_head_txt"></h1>
2+
<h1><tmpl_var name="list_head_txt"> {tmpl_var name='server_name'}</h1>
33
</div>
44
<p><tmpl_var name="list_desc_txt"></p>
55

@@ -24,4 +24,4 @@ <h1><tmpl_var name="list_head_txt"></h1>
2424
<div class="clear"><div class="right">
2525
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_config_edit.php">{tmpl_var name='btn_save_txt'}</button>
2626
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_config_list.php">{tmpl_var name='btn_cancel_txt'}</button>
27-
</div></div>
27+
</div></div>

interface/web/admin/templates/server_config_mail_edit.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class='page-header'>
2-
<h1><tmpl_var name="list_head_txt"></h1>
2+
<h1><tmpl_var name="list_head_txt"> {tmpl_var name='server_name'}</h1>
33
</div>
44
<p><tmpl_var name="list_desc_txt"></p>
55

0 commit comments

Comments
 (0)