Skip to content

Commit 8bf47f6

Browse files
author
Till Brehm
committed
Merge branch '5785-fixes' into 'develop'
fixed server id and type limit on interface (from !1230) See merge request ispconfig/ispconfig3!1231
2 parents 906679d + b974f84 commit 8bf47f6

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

interface/web/admin/directive_snippets_del.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,19 @@
4949

5050
class page_action extends tform_actions {
5151
function onBeforeDelete() {
52-
global $app, $conf;
52+
global $app;
5353

5454
if($this->dataRecord['type'] === 'php') {
5555
$rlike = $this->dataRecord['directive_snippets_id'].'|,'.$this->dataRecord['directive_snippets_id'].'|'.$this->dataRecord['directive_snippets_id'].',';
56-
$affected_snippets = $app->db->queryAllRecords('SELECT directive_snippets_id FROM directive_snippets WHERE required_php_snippets REGEXP ? AND type = ?', $rlike, 'apache');
56+
$affected_snippets = $app->db->queryAllRecords('SELECT directive_snippets_id FROM directive_snippets WHERE required_php_snippets REGEXP ?', $rlike);
5757
if(is_array($affected_snippets) && !empty($affected_snippets)) {
5858
foreach($affected_snippets as $snippet) {
5959
$sql_in[] = $snippet['directive_snippets_id'];
6060
}
61-
$affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE server_id = ? AND directive_snippets_id IN ?', $conf['server_id'], $sql_in);
61+
$affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE directive_snippets_id IN ?', $sql_in);
6262
}
6363
} elseif($this->dataRecord['type'] === 'apache' || $this->dataRecord['type'] === 'nginx') {
64-
$affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE server_id = ? AND directive_snippets_id = ?', $conf['server_id'], $this->dataRecord['directive_snippets_id']);
64+
$affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE directive_snippets_id = ?', $this->dataRecord['directive_snippets_id']);
6565
}
6666

6767
if(!empty($affected_sites)) {

interface/web/admin/directive_snippets_edit.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,19 @@
5050
class page_action extends tform_actions {
5151

5252
private function getAffectedSites() {
53-
global $app, $conf;
53+
global $app;
5454

5555
if($this->dataRecord['type'] === 'php') {
5656
$rlike = $this->dataRecord['id'].'|,'.$this->dataRecord['id'].'|'.$this->dataRecord['id'].',';
57-
$affected_snippets = $app->db->queryAllRecords('SELECT directive_snippets_id FROM directive_snippets WHERE required_php_snippets REGEXP ? AND type = ?', $rlike, 'apache');
57+
$affected_snippets = $app->db->queryAllRecords('SELECT directive_snippets_id FROM directive_snippets WHERE required_php_snippets REGEXP ?', $rlike);
5858
if(is_array($affected_snippets) && !empty($affected_snippets)) {
5959
foreach($affected_snippets as $snippet) {
6060
$sql_in[] = $snippet['directive_snippets_id'];
6161
}
62-
$affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE server_id = ? AND directive_snippets_id IN ?', $conf['server_id'], $sql_in);
62+
$affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE directive_snippets_id IN ?', $sql_in);
6363
}
6464
} elseif($this->dataRecord['type'] === 'apache' || $this->dataRecord['type'] === 'nginx') {
65-
$affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE server_id = ? AND directive_snippets_id = ?', $conf['server_id'], $this->dataRecord['id']);
65+
$affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE directive_snippets_id = ?', $this->dataRecord['id']);
6666
}
6767

6868
return $affected_sites;

0 commit comments

Comments
 (0)