config.php partly solved, see #117
[mailer.git] / inc / libs / security_functions.php
index 9d1cf456250de2fb19a4f9403aa467bb0c7663d1..6e1084ce94a7c7181b4e5664ad049cb494260291 100644 (file)
@@ -90,7 +90,7 @@ if (!isset($_POST)) {
 // Generate arrays which holds the relevante chars to replace
 $GLOBALS['security_chars'] = array(
        // The chars we are looking for...
-       'from' => array("{", "}", '/', '.', "'", "$", "(", ")", '{--', '--}', "%", ';', "[", "]", ':', "--"),
+       'from' => array("{", "}", '/', '.', "'", "$", '(', ')', '{--', '--}', "%", ';', "[", "]", ':', "--"),
        // ... and we will replace to.
        'to'   => array(
                "{OPEN_ANCHOR2}",
@@ -163,15 +163,15 @@ if (!defined('_OB_CACHING')) {
        if (phpversion() >= '4.0.4pl1' && (strstr(getenv('HTTP_USER_AGENT'),'compatible') || (strstr(getenv('HTTP_USER_AGENT'), "Mozilla")))) {
                if ((extension_loaded('zlib')) && (function_exists('ob_start'))) {
                        // Start caching
-                       define('_OB_CACHING', "on");
+                       define('_OB_CACHING', 'on');
                        ob_start();
                } else {
                        // Extension not loaded or required function is missing
-                       define('_OB_CACHING', "404");
+                       define('_OB_CACHING', '404');
                }
        } else {
                // Old PHP version
-               define('_OB_CACHING', "old");
+               define('_OB_CACHING', 'old');
        }
 }
 
@@ -183,9 +183,9 @@ $SELF_DIR  = dirname($_SERVER['PHP_SELF']);
 $SELF_FILE = basename($_SERVER['PHP_SELF']);
 
 // Check for a .php inside the $SELF_DIR...
-while (ereg(".php", $SELF_DIR)) {
+while (ereg('.php', $SELF_DIR)) {
        // Correct the dirname
-       $SELF_DIR = substr($SELF_DIR, 0, (strpos($SELF_DIR, ".php") + 4));
+       $SELF_DIR = substr($SELF_DIR, 0, (strpos($SELF_DIR, '.php') + 4));
        // Rewrite filename...
        $SELF_FILE = basename($SELF_DIR);
        // ... and dirname
@@ -200,7 +200,7 @@ unset($SELF_DIR);
 unset($SELF_FILE);
 
 // Security system loaded...
-define('__SECURITY', "1");
+define('__SECURITY', '1');
 
 //
 ?>