]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-sql_patches.php
One more wrapper function introduced, fixed for installation phase
[mailer.git] / inc / extensions / ext-sql_patches.php
index 7db75716c0421d3a5e7f49947fedb1206b02ef88..64883e68b3df23c8d11cd3314ce926e95194d640 100644 (file)
@@ -755,24 +755,15 @@ INDEX (`ip`)
                setConfigEntry('secret_key', '');
 
                // Read key from secret file
-               if ((isExtensionInstalledAndNewer('sql_patches', '0.3.6')) && ((getConfig('file_hash') == '') || (getConfig('master_salt') == '') || (getConfig('pass_scramble') == ''))) {
-                       // Cache instance
+               if ((isExtensionInstalledAndNewer('sql_patches', '0.3.6')) && ((getFileHash() == '') || (getMasterSalt() == '') || (getPassScramble() == ''))) {
                        // Maybe need setup of secret key!
                        loadIncludeOnce('inc/gen_sql_patches.php');
-
-                       // @TODO Rewrite this to a filter
-                       if ((isExtensionInstalledAndNewer('cache', '0.1.2')) && (isCacheInstanceValid())) {
-                               // Destroy some cache files
-                               if ($GLOBALS['cache_instance']->loadCacheFile('config'))    $GLOBALS['cache_instance']->removeCacheFile();
-                               if ($GLOBALS['cache_instance']->loadCacheFile('extension')) $GLOBALS['cache_instance']->removeCacheFile();
-                               if ($GLOBALS['cache_instance']->loadCacheFile('modules'))   $GLOBALS['cache_instance']->removeCacheFile();
-                       } // END - if
                } // END - if
 
                // Test again
-               if ((isExtensionInstalledAndNewer('sql_patches', '0.3.6')) && (getConfig('file_hash') != '') && (getConfig('master_salt') != '') && (getConfig('pass_scramble') != '')) {
+               if ((isExtensionInstalledAndNewer('sql_patches', '0.3.6')) && (getFileHash() != '') && (getMasterSalt() != '') && (getPassScramble() != '')) {
                        // File hash fas generated so we can also file the secret file... hopefully.
-                       $hashFile = sprintf("%sinc/.secret/.%s", getConfig('PATH'), getConfig('file_hash'));
+                       $hashFile = sprintf("%sinc/cache/.%s.cache", getPath(), getFileHash());
                        if (isFileReadable($hashFile)) {
                                // Read file
                                setConfigEntry('secret_key', readFromFile($hashFile));