Skip to content

Commit e5caaad

Browse files
author
Marius Burkard
committed
Merge branch 'stable-3.1'
2 parents 71cae5d + 82fb0fa commit e5caaad

File tree

608 files changed

+6904
-876
lines changed

Some content is hidden

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

608 files changed

+6904
-876
lines changed

install/lib/update.lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ function updateDbAndIni() {
208208
if(in_array($next_db_version,explode(',',$silent_update_versions))) {
209209
$cmd .= ' > /dev/null 2> /dev/null';
210210
} else {
211-
$cmd .= ' > /var/log/ispconfig_install.log 2> /var/log/ispconfig_install.log';
211+
$cmd .= ' >> /var/log/ispconfig_install.log 2>> /var/log/ispconfig_install.log';
212212
}
213213
system($cmd);
214214

install/tpl/apache_ispconfig.conf.master

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
# ISPConfig Logfile configuration for vlogger
44
################################################
55

6+
SetEnvIf Request_URI "^/datalogstatus.php$" dontlog
7+
68
LogFormat "%v %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig
7-
CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig
9+
CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig env=!dontlog
810

911
<Directory /var/www/clients>
1012
AllowOverride None

interface/lib/classes/db_mysql.inc.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,8 @@ public function datalogStatus($login = '') {
740740
global $app;
741741

742742
$return = array('count' => 0, 'entries' => array());
743-
if($_SESSION['s']['user']['typ'] == 'admin') return $return; // these information should not be displayed to admin users
743+
//if($_SESSION['s']['user']['typ'] == 'admin') return $return; // these information should not be displayed to admin users
744+
// removed in favor of new non intrusive datalogstatus notification header
744745

745746
if($login == '' && isset($_SESSION['s']['user'])) {
746747
$login = $_SESSION['s']['user']['username'];

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function update_record_permissions($tablename, $index_field, $index_value
5252
global $app;
5353

5454
if(!$this->checkPerm($session_id, 'admin_record_permissions')) {
55-
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
55+
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
5656
return false;
5757
}
5858

@@ -62,7 +62,7 @@ public function update_record_permissions($tablename, $index_field, $index_value
6262
// check if userid is valid
6363
$check = $app->db->queryOneRecord('SELECT userid FROM sys_user WHERE userid = ?', $app->functions->intval($value));
6464
if(!$check || !$check['userid']) {
65-
$this->server->fault('invalid parameters', $value . ' is no valid sys_userid.');
65+
throw new SoapFault('invalid parameters', $value . ' is no valid sys_userid.');
6666
return false;
6767
}
6868
$permissions[$key] = $app->functions->intval($value);
@@ -71,7 +71,7 @@ public function update_record_permissions($tablename, $index_field, $index_value
7171
// check if groupid is valid
7272
$check = $app->db->queryOneRecord('SELECT groupid FROM sys_group WHERE groupid = ?', $app->functions->intval($value));
7373
if(!$check || !$check['groupid']) {
74-
$this->server->fault('invalid parameters', $value . ' is no valid sys_groupid.');
74+
throw new SoapFault('invalid parameters', $value . ' is no valid sys_groupid.');
7575
return false;
7676
}
7777
$permissions[$key] = $app->functions->intval($value);
@@ -81,7 +81,7 @@ public function update_record_permissions($tablename, $index_field, $index_value
8181
// check if permissions are valid
8282
$value = strtolower($value);
8383
if(!preg_match('/^[riud]+$/', $value)) {
84-
$this->server->fault('invalid parameters', $value . ' is no valid permission string.');
84+
throw new SoapFault('invalid parameters', $value . ' is no valid permission string.');
8585
return false;
8686
}
8787

@@ -95,7 +95,7 @@ public function update_record_permissions($tablename, $index_field, $index_value
9595

9696
break;
9797
default:
98-
$this->server->fault('invalid parameters', 'Only sys_userid, sys_groupid, sys_perm_user and sys_perm_group parameters can be changed with this function.');
98+
throw new SoapFault('invalid parameters', 'Only sys_userid, sys_groupid, sys_perm_user and sys_perm_group parameters can be changed with this function.');
9999
break;
100100
}
101101
}

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

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function sites_aps_update_package_list($session_id)
4040
global $app;
4141

4242
if(!$this->checkPerm($session_id, 'sites_aps_update_package_list')) {
43-
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
43+
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
4444
return false;
4545
}
4646

@@ -60,7 +60,7 @@ public function sites_aps_available_packages_list($session_id, $params = array()
6060
global $app;
6161

6262
if(!$this->checkPerm($session_id, 'sites_aps_available_packages_list')) {
63-
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
63+
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
6464
return false;
6565
}
6666

@@ -82,7 +82,7 @@ public function sites_aps_get_package_details($session_id, $primary_id)
8282
global $app;
8383

8484
if(!$this->checkPerm($session_id, 'sites_aps_get_package_details')) {
85-
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
85+
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
8686
return false;
8787
}
8888

@@ -98,14 +98,14 @@ public function sites_aps_get_package_details($session_id, $primary_id)
9898

9999
// Make sure an integer ID is given
100100
if (!isset($primary_id) || !$gui->isValidPackageID($primary_id, true)) {// always adminflag
101-
$this->server->fault('package_error', 'The given Package ID is not valid.');
101+
throw new SoapFault('package_error', 'The given Package ID is not valid.');
102102
return false;
103103
}
104104

105105
// Get package details
106106
$details = $gui->getPackageDetails($primary_id);
107107
if (isset($details['error'])) {
108-
$this->server->fault('package_error', $details['error']);
108+
throw new SoapFault('package_error', $details['error']);
109109
return false;
110110
}
111111

@@ -121,7 +121,7 @@ public function sites_aps_get_package_file($session_id, $primary_id, $filename)
121121
global $app;
122122

123123
if(!$this->checkPerm($session_id, 'sites_aps_get_package_file')) {
124-
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
124+
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
125125
return false;
126126
}
127127

@@ -137,14 +137,14 @@ public function sites_aps_get_package_file($session_id, $primary_id, $filename)
137137

138138
// Make sure an integer ID is given
139139
if (!isset($primary_id) || !$gui->isValidPackageID($primary_id, true)) {// always adminflag
140-
$this->server->fault('package_error', 'The given Package ID is not valid.');
140+
throw new SoapFault('package_error', 'The given Package ID is not valid.');
141141
return false;
142142
}
143143

144144
// Get package details
145145
$details = $gui->getPackageDetails($primary_id);
146146
if (isset($details['error'])) {
147-
$this->server->fault('package_error', $details['error']);
147+
throw new SoapFault('package_error', $details['error']);
148148
return false;
149149
}
150150

@@ -155,7 +155,7 @@ public function sites_aps_get_package_file($session_id, $primary_id, $filename)
155155
foreach ($details['Screenshots'] as $screen) { if (basename($screen['ScreenPath']) == $filename) { $found = true; break; } }
156156

157157
if (!$found) {
158-
$this->server->fault('package_error', 'File not found in package.');
158+
throw new SoapFault('package_error', 'File not found in package.');
159159
return false;
160160
}
161161

@@ -167,7 +167,7 @@ public function sites_aps_get_package_settings($session_id, $primary_id)
167167
global $app;
168168

169169
if(!$this->checkPerm($session_id, 'sites_aps_get_package_details')) {
170-
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
170+
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
171171
return false;
172172
}
173173

@@ -183,14 +183,14 @@ public function sites_aps_get_package_settings($session_id, $primary_id)
183183

184184
// Make sure an integer ID is given
185185
if (!isset($primary_id) || !$gui->isValidPackageID($primary_id, true)) {// always adminflag
186-
$this->server->fault('package_error', 'The given Package ID is not valid.');
186+
throw new SoapFault('package_error', 'The given Package ID is not valid.');
187187
return false;
188188
}
189189

190190
// Get package settings
191191
$settings = $gui->getPackageSettings($primary_id);
192192
if (isset($settings['error'])) {
193-
$this->server->fault('package_error', $settings['error']);
193+
throw new SoapFault('package_error', $settings['error']);
194194
return false;
195195
}
196196

@@ -205,7 +205,7 @@ public function sites_aps_change_package_status($session_id, $primary_id, $param
205205
global $app;
206206

207207
if(!$this->checkPerm($session_id, 'sites_aps_change_package_status')) {
208-
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
208+
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
209209
return false;
210210
}
211211

@@ -215,12 +215,12 @@ public function sites_aps_change_package_status($session_id, $primary_id, $param
215215

216216
// Make sure an integer ID is given
217217
if (!isset($primary_id) || !$gui->isValidPackageID($primary_id, true)) {// always adminflag
218-
$this->server->fault('package_error', 'The given Package ID is not valid.');
218+
throw new SoapFault('package_error', 'The given Package ID is not valid.');
219219
return false;
220220
}
221221

222222
if(!isset($params['package_status']) || (($params['package_status'] != PACKAGE_ENABLED) && ($params['package_status'] != PACKAGE_LOCKED))) {
223-
$this->server->fault('package_error', 'Wrong new status: '.$params['package_status']);
223+
throw new SoapFault('package_error', 'Wrong new status: '.$params['package_status']);
224224
return false;
225225
}
226226

@@ -235,7 +235,7 @@ public function sites_aps_install_package($session_id, $primary_id, $params)
235235
global $app;
236236

237237
if(!$this->checkPerm($session_id, 'sites_aps_install_package')) {
238-
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
238+
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
239239
return false;
240240
}
241241

@@ -251,25 +251,25 @@ public function sites_aps_install_package($session_id, $primary_id, $params)
251251

252252
// Make sure an integer ID is given
253253
if (!isset($primary_id) || !$gui->isValidPackageID($primary_id, true)) {// always adminflag
254-
$this->server->fault('package_error', 'The given Package ID is not valid.');
254+
throw new SoapFault('package_error', 'The given Package ID is not valid.');
255255
return false;
256256
}
257257

258258
// Get package details
259259
$details = $gui->getPackageDetails($primary_id);
260260
if (isset($details['error'])) {
261-
$this->server->fault('package_error', $details['error']);
261+
throw new SoapFault('package_error', $details['error']);
262262
return false;
263263
}
264264
$settings = $gui->getPackageSettings($primary_id);
265265
if (isset($settings['error'])) {
266-
$this->server->fault('package_error', $settings['error']);
266+
throw new SoapFault('package_error', $settings['error']);
267267
return false;
268268
}
269269

270270
// Check given Site/VHostDomain
271271
if (!isset($params['main_domain'])) {
272-
$this->server->fault('invalid parameters', 'No valid domain given.');
272+
throw new SoapFault('invalid parameters', 'No valid domain given.');
273273
return false;
274274
}
275275

@@ -284,7 +284,7 @@ public function sites_aps_install_package($session_id, $primary_id, $params)
284284
}
285285

286286
if (!$domain) {
287-
$this->server->fault('invalid parameters', 'No valid domain given.');
287+
throw new SoapFault('invalid parameters', 'No valid domain given.');
288288
return false;
289289
}
290290

@@ -295,7 +295,7 @@ public function sites_aps_install_package($session_id, $primary_id, $params)
295295
return $gui->createPackageInstance($result['input'], $primary_id);
296296
}
297297

298-
$this->server->fault('invalid parameters', implode('<br />', $result['error']));
298+
throw new SoapFault('invalid parameters', implode('<br />', $result['error']));
299299
return false;
300300
}
301301

@@ -304,7 +304,7 @@ public function sites_aps_instance_get($session_id, $primary_id)
304304
global $app;
305305

306306
if(!$this->checkPerm($session_id, 'sites_aps_instance_get')) {
307-
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
307+
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
308308
return false;
309309
}
310310

@@ -318,7 +318,7 @@ public function sites_aps_instance_settings_get($session_id, $primary_id)
318318
global $app;
319319

320320
if(!$this->checkPerm($session_id, 'sites_aps_instance_get')) {
321-
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
321+
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
322322
return false;
323323
}
324324

@@ -332,7 +332,7 @@ public function sites_aps_instance_delete($session_id, $primary_id, $params = ar
332332
global $app;
333333

334334
if(!$this->checkPerm($session_id, 'sites_aps_instance_delete')) {
335-
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
335+
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
336336
return false;
337337
}
338338

@@ -344,7 +344,7 @@ public function sites_aps_instance_delete($session_id, $primary_id, $params = ar
344344
$result = $app->db->queryOneRecord($sql, $primary_id);
345345

346346
if (!$result) {
347-
$this->server->fault('instance_error', 'No valid instance id given.');
347+
throw new SoapFault('instance_error', 'No valid instance id given.');
348348
return false;
349349
}
350350

0 commit comments

Comments
 (0)