Dolibarr/dolibarr — pull request #309 by lrq3000 (2012-08-14 20:08:23+00:00)
Title: Add conditional substitution IF/ELSEIF/ENDIF for ODT

This patch add conditional substitution based on variables in ODT.

For example:

[!-- IF {my_var} --]
Draw this if true.
[!-- ELSE {my_var} --]
Draw this if false
[!-- ENDIF {my_var} --]

If {my_var} is evaluated to something (true or whatever), then the IF block will be executed. If {my_var} is false/0/empty/unset then the ELSE block will be executed.
Of course, ELSE is optional.

PS: now that the ODTPHP library is already modified compared to the original lib, you may also want to take another look at the phpeval patch for odt:
https://github.com/lrq3000/dolibarr/commit/a27b99af6b6f95638619153ff42ab235e486833e

Signed-off-by: Stephen L.