From 09785da22a236ff038e94b838234a552b65042be Mon Sep 17 00:00:00 2001 From: messju Date: Fri, 9 Dec 2005 14:48:28 +0000 Subject: [PATCH] fixed examples. added mentioning off $security when PHP functions are used with {if} --- .../language-function-if.xml | 40 +++++++++---------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/docs/en/designers/language-builtin-functions/language-function-if.xml b/docs/en/designers/language-builtin-functions/language-function-if.xml index a221d1df..d6d3dc37 100644 --- a/docs/en/designers/language-builtin-functions/language-function-if.xml +++ b/docs/en/designers/language-builtin-functions/language-function-if.xml @@ -14,7 +14,11 @@ &&, and, is_array(), etc. - + + If $security is enabled + then IF_FUNCS array in the $security_settings array. + The following is a list of recognized qualifiers, which must be separated from surrounding elements by spaces. Note that items listed @@ -161,25 +165,29 @@ ... {/if} -{* - the following syntax will NOT work, conditional qualifiers - must be separated from surrounding elements by spaces -*} -{if $name=="Fred" || $name=="Wilma"} - ... -{/if} - {* parenthesis are allowed *} {if ( $amount < 0 or $amount > 1000 ) and $volume >= #minVolAmt#} ... {/if} + {* you can also embed php function calls *} {if count($var) gt 0} ... {/if} +{* check for array. *} +{if is_array($foo) } + ..... +{/if} + +{* check for not null. *} +{if isset($foo) } + ..... +{/if} + + {* test if values are even or odd *} {if $var is even} ... @@ -191,11 +199,13 @@ ... {/if} + {* test if var is divisible by 4 *} {if $var is div by 4} ... {/if} + {* test if var is even, grouped by two. i.e., 0=even, 1=even, 2=odd, 3=odd, 4=even, 5=even, etc. @@ -208,18 +218,6 @@ {if $var is even by 3} ... {/if} - -{* ------- if with php functions ------- *} -{* check for array. *} -{if is_array($foo) } - ..... -{/if} - -{* check for array. *} -{if isset($foo) } - ..... -{/if} - ]]>