You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// xfs only supports timers globally, not per user.
@@ -177,21 +177,23 @@ function update($event_name, $data) {
177
177
}
178
178
179
179
functiondelete($event_name, $data) {
180
-
global$app, $conf;
180
+
global$app;
181
181
182
182
//* get data from web
183
183
$parent_domain = $app->db->queryOneRecord("SELECT `domain_id`, `system_user`, `system_group`, `document_root`, `hd_quota` FROM `web_domain` WHERE `domain_id` = ?", $data["old"]["parent_domain_id"]);
184
-
if(!$parent_domain["domain_id"]) {
185
-
$app->log("Parent domain not found", LOGLEVEL_WARN);
186
-
return0;
187
-
}
188
-
189
-
// Get the client ID
190
-
$client = $app->dbmaster->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ?", $data["old"]["sys_groupid"]);
191
-
$client_id = intval($client["client_id"]);
192
-
unset($client);
193
184
194
-
$this->parent_domain = $parent_domain;
185
+
if(!$parent_domain) {
186
+
$tmp = $app->db->queryOneRecord('SELECT * FROM sys_datalog WHERE dbtable = ? AND dbidx = ? AND `action` = ? ORDER BY `datalog_id` DESC', 'web_domain', 'domain_id:' . $data['old']['parent_domain_id'], 'd');
187
+
$tmp = unserialize($tmp);
188
+
if($tmp && isset($tmp['old'])) {
189
+
$this->parent_domain = $tmp['old'];
190
+
} else {
191
+
$app->log("Parent domain not found", LOGLEVEL_WARN);
0 commit comments