X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fpatch-system.php;h=939f15ee621cef422f45e09537a31078e9909d41;hb=d5ee31ebfc85f22fc691b8c2753c42e188c1c4ef;hp=9eb7c43df2bb4850671e0d28d84ce5d30bd56bb2;hpb=0369c36aaab5af6ed44da1e13a53baef285f79b4;p=mailer.git diff --git a/inc/patch-system.php b/inc/patch-system.php index 9eb7c43df2..939f15ee62 100644 --- a/inc/patch-system.php +++ b/inc/patch-system.php @@ -32,18 +32,17 @@ ************************************************************************/ // Some security stuff... -if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) -{ +if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } // Check for patch level differences between databases and current hard-coded -if (CURR_SVN_REVISION > $_CONFIG['patch_level']) { +if ((CURR_SVN_REVISION > getConfig('patch_level')) || (getConfig('patch_level') == "CURR_SVN_REVISION") || (getConfig('patch_ctime') == "UNIX_TIMES")) { // Update database and CONFIG array UPDATE_CONFIG(array("patch_level", "patch_ctime"), array(CURR_SVN_REVISION, "UNIX_TIMESTAMP()")); - $_CONFIG['patch_level'] = CURR_SVN_REVISION; - $_CONFIG['patch_ctime'] = time(); + setConfigEntry('patch_level', CURR_SVN_REVISION); + setConfigEntry('patch_ctime', time()); } // END - if //