Skip to content

Commit 3c5f55d

Browse files
author
Till Brehm
committed
Delete client asstes in reverse creation order.
1 parent 63b4da4 commit 3c5f55d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interface/web/client/client_del.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ function onBeforeDelete() {
134134
if($client_group_id > 1) {
135135
foreach($tables_array as $table) {
136136
if($table != '') {
137-
$records = $app->db->queryAllRecords("SELECT * FROM ?? WHERE sys_groupid = ?", $table, $client_group_id);
138137
//* find the primary ID of the table
139138
$table_info = $app->db->tableInfo($table);
140139
$index_field = '';
@@ -143,6 +142,7 @@ function onBeforeDelete() {
143142
}
144143
//* Delete the records
145144
if($index_field != '') {
145+
$records = $app->db->queryAllRecords("SELECT * FROM ?? WHERE sys_groupid = ? ORDER BY ? DESC", $table, $client_group_id, $index_field);
146146
if(is_array($records)) {
147147
foreach($records as $rec) {
148148
$app->db->datalogDelete($table, $index_field, $rec[$index_field]);

0 commit comments

Comments
 (0)