New feature of repaying points to user/jackpot/shred added
[mailer.git] / inc / extensions / ext-sql_patches.php
index a4b5179c539057bbb149378c517aa65f8d919b06..294db45c190a7b158bebfe2a03ea439a6ca00b59 100644 (file)
@@ -32,8 +32,7 @@
  ************************************************************************/
 
 // Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])))
-{
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF']))) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 }
@@ -532,7 +531,7 @@ default: // Do stuff when extension is loaded
        $dummy = LOAD_CONFIG();
 
        // When the sql_patches is not installed we cannot load it's configuration... *sigh*
-       if (GET_EXT_VERSION("sql_patches") != "") {
+       if (GET_EXT_VERSION("sql_patches") != '') {
                $_CONFIG['ext_autopurge']     = $dummy['ext_autopurge'];
                $_CONFIG['mails_page']        = $dummy['mails_page'];
                $_CONFIG['index_home']        = $dummy['index_home'];
@@ -568,13 +567,11 @@ default: // Do stuff when extension is loaded
                $_CONFIG['show_timings']      = $dummy['show_timings'];
 
                // Read key from secret file
-               if ((empty($_CONFIG['file_hash'])) || (empty($_CONFIG['master_salt'])) || (empty($_CONFIG['pass_scramble'])))
-               {
+               if ((empty($_CONFIG['file_hash'])) || (empty($_CONFIG['master_salt'])) || (empty($_CONFIG['pass_scramble']))) {
                        // Maybe need setup of secret key!
                        require_once(PATH."inc/gen_sql_patches.php");
 
-                       if (GET_EXT_VERSION("cache") >= "0.1.2")
-                       {
+                       if (GET_EXT_VERSION("cache") >= "0.1.2") {
                                // Remove extensions and mod_reg cache file
                                require_once(PATH."inc/libs/cache_functions.php");
                                require_once(PATH."inc/extensions/ext-cache.php");
@@ -584,15 +581,11 @@ default: // Do stuff when extension is loaded
                }
 
                // Test again
-               if ((!empty($_CONFIG['file_hash'])) && (!empty($_CONFIG['master_salt'])) && (!empty($_CONFIG['pass_scramble'])))
-               {
+               if ((!empty($_CONFIG['file_hash'])) && (!empty($_CONFIG['master_salt'])) && (!empty($_CONFIG['pass_scramble']))) {
                        // File hash fas generated so we can also file the secret file... hopefully.
-                       if ((file_exists(PATH."inc/.secret/.".$_CONFIG['file_hash'])) && (is_readable(PATH."inc/.secret/.".$_CONFIG['file_hash'])))
-                       {
+                       if ((file_exists(PATH."inc/.secret/.".$_CONFIG['file_hash'])) && (is_readable(PATH."inc/.secret/.".$_CONFIG['file_hash']))) {
                                $_CONFIG['secret_key'] = implode("", file(PATH."inc/.secret/.".$_CONFIG['file_hash']));
-                       }
-                        else
-                       {
+                       } else {
                                // Cannot read secret file!
                                mxchange_die("Cannot read secret file!");
                        }