Skip to content

Commit e631410

Browse files
committed
Fixed: FS#1220 - /var/vmail/(domain)/(user) directories and files not delete when mail_user is deleted via remote.
1 parent 79c08d1 commit e631410

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

interface/lib/classes/remoting.inc.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2065,6 +2065,13 @@ private function deleteQuery($formdef_file, $primary_id)
20652065
//* Load the form definition
20662066
$app->remoting_lib->loadFormDef($formdef_file);
20672067

2068+
$old_rec = $app->remoting_lib->getDataRecord($primary_id);
2069+
2070+
// set a few values for compatibility with tform actions, mostly used by plugins
2071+
$this->oldDataRecord = $old_rec;
2072+
$this->id = $primary_id;
2073+
$this->dataRecord = $params;
2074+
20682075
//* Get the SQL query
20692076
$sql = $app->remoting_lib->getDeleteSQL($primary_id);
20702077

@@ -2079,8 +2086,7 @@ private function deleteQuery($formdef_file, $primary_id)
20792086

20802087
//* Save changes to Datalog
20812088
if($app->remoting_lib->formDef["db_history"] == 'yes') {
2082-
$rec = $app->remoting_lib->getDataRecord($primary_id);
2083-
$app->remoting_lib->datalogSave('DELETE',$primary_id,$rec,array());
2089+
$app->remoting_lib->datalogSave('DELETE',$primary_id,$old_rec,array());
20842090
}
20852091

20862092

0 commit comments

Comments
 (0)