Custom code API + revision bug

eugenio

Administrator
Staff member
The method update_record, if audit/revisions for the updated table is enabled, registers after update, in revisions, the wrong version of the record (the version before the update instead of the version after the update).

This bug will be fixed in the next release, in the meantime, you can fix it by applying this change to the file include/classes/ddb_api.php:

Look for the update_record function (static public function update_record) and move this line:

$res = execute_prepared_db($res_prepare,0);

before this line:

log_operation('update', $sql.$bind_values);

Best,
 
Top