diff options
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -251,6 +251,26 @@ function bail($message = "Bailed.\n") /** + * Check wether I am on a live server for this service. Honors 'aslive' and 'asdevel' debug vars + * @return true if servertype is 'live' + */ +function is_live() +{ + return (preg_match("/^live/", $GLOBALS['ULTRASERVERTYPE']) || EDC('aslive')) && !EDC('asdevel'); +} + + +/** + * Check wether I am on a development server for this service. Honors 'aslive' and 'asdevel' debug vars + * @return true if servertype is 'devel' + */ +function is_devel() +{ + return (preg_match("/^devel/", $GLOBALS['ULTRASERVERTYPE']) || EDC('asdevel')) && !EDC('aslive'); +} + + +/** * Convert a string to ASCII-only chars, map/strip ISO-8859-1 accents * @param $text Text to convert * @return mapped/stripped version of $text contains only chars [0..127] |