diff options
author | neoraider <devnull@localhost> | 2006-03-05 01:01:01 +0100 |
---|---|---|
committer | neoraider <devnull@localhost> | 2006-03-05 01:01:01 +0100 |
commit | d8edab617c02409178e82a59ce704d7da5de6d9a (patch) | |
tree | 59a6f6fdc26dd908d69f730a418e6a303015c384 /code/util.inc.php | |
parent | b7cab9a930cf9ab53e5d11764cd560c7d9ef1632 (diff) | |
download | neon-d8edab617c02409178e82a59ce704d7da5de6d9a.tar neon-d8edab617c02409178e82a59ce704d7da5de6d9a.zip |
Anstatt der defined-Abfragen wird jetzt require_once benutzt.
Diffstat (limited to 'code/util.inc.php')
-rw-r--r-- | code/util.inc.php | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/code/util.inc.php b/code/util.inc.php index 724f8bd..194102f 100644 --- a/code/util.inc.php +++ b/code/util.inc.php @@ -1,27 +1,23 @@ <?PHP - if(!defined('UTIL_INC')) { - define('UTIL_INC', 1); + function Subst($string, $subst = array()) { + $tr['$$'] = '$'; - function Subst($string, $subst = array()) { - $tr['$$'] = '$'; - - foreach($subst as $key => $value) - $tr['$' . $key] = $value; - - krsort($tr); - - return strtr($string, $tr); - } + foreach($subst as $key => $value) + $tr['$' . $key] = $value; - if(get_magic_quotes_gpc()) { - function Unquote($string) { - return stripslashes($string); - } - } - else { - function Unquote($string) { - return $string; - } - } + krsort($tr); + + return strtr($string, $tr); + } + + if(get_magic_quotes_gpc()) { + function Unquote($string) { + return stripslashes($string); + } + } + else { + function Unquote($string) { + return $string; + } } ?> |