Quote:
Originally Posted by capink
The condition chaley suggested is per action. It is currently not going to work. I think the solution to this would be to validate only actions that are going to run under the current conditions. So if you set a condition on an action using chaley's new function, the action will only be validated if the condition is true. I hope the explanation makes sense.
|
Validating only actions that will be run makes sense.
However, unless I am misunderstanding I don't think the problem is as large as you indicate, at least for template actions. Looking at check_template() I see that the template is run to see if it produces an error. Assume the template looks something like this
Code:
program:
if field_exists('#somefield') then
do_something();
do_something_else()
fi
This template won't produce an error if #somefield doesn't exist so it would validate. Of course it might not do what the action requires, which is a different problem.