[pmwiki-users] Please explain the IsEnabled function

DaveG pmwiki at solidgone.com
Mon May 3 21:03:36 CDT 2010



On 5/3/2010 3:35 PM, pmwiki at 911networks.com wrote:
> As you can see, I'm not a php expert. Can somebody explain to me the
> following:
>
> Begin quote:
> IsEnabled($var, $flag)
>      Returns the value of $var if it is set; otherwise it returns
>      $flag (i.e., a default value). Thus, IsEnabled($var, 0) returns
>      false if $var is false or is not set
> End quote
>
> Now in robots.php:
> Begin quote:
> if (IsEnabled($EnableRobotCloakActions, 0 )) {
>      blah blah
> End quote
>
> If $EnableRobotCloakActions is set to 1, the blah blah should not
> be executed?
If it's already 1, then blah will be executed.
If it's already 0, then blah will not be executed.


  ~ ~ Dave



More information about the pmwiki-users mailing list