@@ -276,16 +276,16 @@ function onDelete() {
276276 if ($ app ->tform ->checkPerm ($ this ->id ,'d ' ) == false ) $ app ->error ($ app ->lng ('error_no_delete_permission ' ));
277277 }
278278
279- $ record_old = $ app ->db ->queryOneRecord ("SELECT * FROM " .$ liste ["table " ]." WHERE " .$ liste ["table_idx " ]." = " .$ this ->id );
279+ //$this->dataRecord = $app->db->queryOneRecord("SELECT * FROM ".$liste["table"]." WHERE ".$liste["table_idx"]." = ".$this->id);
280+ $ this ->dataRecord = $ app ->tform ->getDataRecord ($ this ->id );
280281
281282 // Saving record to datalog when db_history enabled
282283 if ($ app ->tform ->formDef ["db_history " ] == 'yes ' ) {
283- $ old_data_record = $ app ->tform ->getDataRecord ($ this ->id );
284- $ app ->tform ->datalogSave ('DELETE ' ,$ this ->id ,$ old_data_record ,array ());
285- unset($ old_data_record );
284+ //$old_data_record = $app->tform->getDataRecord($this->id);
285+ $ app ->tform ->datalogSave ('DELETE ' ,$ this ->id ,$ this ->dataRecord ,array ());
286286 }
287287
288- $ app ->db ->query ("DELETE FROM " .$ liste ["table " ]." WHERE " .$ liste ["table_idx " ]." = " .$ this ->id );
288+ $ app ->db ->query ("DELETE FROM " .$ liste ["table " ]." WHERE " .$ liste ["table_idx " ]." = " .$ this ->id . " LIMIT 0,1 " );
289289
290290 // loading plugins
291291 $ next_tab = $ app ->tform ->getCurrentTab ();
@@ -296,6 +296,8 @@ function onDelete() {
296296 foreach ($ this ->plugins as $ plugin ) {
297297 $ plugin ->onDelete ();
298298 }
299+
300+ $ this ->onAfterDelete ();
299301 }
300302
301303 //header("Location: ".$liste["file"]."?PHPSESSID=".$_SESSION["s"]["id"]);
@@ -310,6 +312,10 @@ function onDelete() {
310312 }
311313 exit ;
312314
315+ }
316+
317+ function onAfterDelete () {
318+ global $ app , $ conf ;
313319 }
314320
315321 /**
0 commit comments