--- edit.c.bak Thu Dec 15 18:58:38 2005 +++ edit.c Fri Dec 16 02:09:35 2005 @@ -167,44 +167,41 @@ applyChangeActions (PR *pr, PR *oldPR, F ChangeActions actions, ErrorDesc *err, FormatNamedParameter *params) { - { - ChangeActions actionList = actions; + ChangeActions actionList = actions; - while (actionList != NULL) - { - if (actionList->expr == NULL - || pr_matches_expr (pr, oldPR, actionList->expr, params)) - { - if (applyChangeAction (actionList, pr, oldPR, field, err, params)) - { - return 1; - } - } - actionList = actionList->next; - } - } - - if (field != InvalidFieldIndex && addAuditEntryP (pr->database, - field, actions)) + while (actionList != NULL) { - ChangeActions action = actions; - while (actions != NULL) + if (actionList->expr == NULL /*alx*/ + || pr_matches_expr (pr, oldPR, actionList->expr, params)) { - if (actions->addAuditTrail) + if (applyChangeAction (actionList, pr, oldPR, field, err, params)) { - break; + return 1; } - actions = actions->next; - } - if (action != NULL) - { - addAuditTrailEnt (pr, action->auditTrailFormat, params, err); - } - else - { - addAuditTrailEnt (pr, NULL, params, err); + if (field != InvalidFieldIndex && addAuditEntryP (pr->database, + field, actions)) + { + while (actions != NULL) + { + if (actions->addAuditTrail) + { + break; + } + actions = actions->next; + } + + if (actionList != NULL) + { + addAuditTrailEnt (pr, actionList->auditTrailFormat, params, err); + } + else + { + addAuditTrailEnt (pr, NULL, params, err); + } + } } + actionList = actionList->next; } return 0;