Index: trunk/core/kernel/globals.php =================================================================== diff -u -N -r3137 -r3210 --- trunk/core/kernel/globals.php (.../globals.php) (revision 3137) +++ trunk/core/kernel/globals.php (.../globals.php) (revision 3210) @@ -368,4 +368,15 @@ eval("\$result =& {$call}({$argumentString});"); return $result; } + + /** + * Checks if constant is defined and has positive value + * + * @param string $const_name + * @return bool + */ + function constOn($const_name) + { + return defined($const_name) && constant($const_name); + } ?> \ No newline at end of file