]> git.mxchange.org Git - mailer.git/blobdiff - inc/patch-system.php
Fixes for running SQL queries
[mailer.git] / inc / patch-system.php
index e3ec443cd32d789bfeb4e66c2f811aa0113d7ce1..e9be4551919aa110a7bdb968599dfeb78c941ebb 100644 (file)
  ************************************************************************/
 
 // 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_PATCH_LEVEL > $_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", "path_ctime"), array(CURR_PATH_LEVEL, "UNIX_TIMESTAMP()"));
-       $_CONFIG['patch_level'] = CURR_PATCH_LEVEL;
+       UPDATE_CONFIG(array("patch_level", "patch_ctime"), array(CURR_SVN_REVISION, "UNIX_TIMESTAMP()"));
+       $_CONFIG['patch_level'] = CURR_SVN_REVISION;
        $_CONFIG['patch_ctime'] = time();
 } // END - if