X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fgen_sql_patches.php;h=b2b984b4e59cb36d146d06ce7fecc76eee3d6c38;hb=5c0d2c01826cb3802aed682513b7f98454394867;hp=090d4341f4870236d7b3ccb20db62ec606ae2a73;hpb=cd7d344ea7007cfa20413acd3e03e50f0ab86d86;p=mailer.git diff --git a/inc/gen_sql_patches.php b/inc/gen_sql_patches.php index 090d4341f4..b2b984b4e5 100644 --- a/inc/gen_sql_patches.php +++ b/inc/gen_sql_patches.php @@ -65,10 +65,10 @@ if (getMasterSalt() == '') { unset($masterSalt); } // END - if -if (getFileHash() == '') { +if ((getFileHash() == '') || (!isFileReadable(getPath() . getCachePath() . '.' . getFileHash() . '.cache'))) { // Create filename from hashed random string $fileHash = sha1(generatePassword(mt_rand(128, 256))); - $FQFN = sprintf("%s%s.%s.cache", + $FQFN = sprintf('%s%s.%s.cache', getPath(), getCachePath(), $fileHash @@ -84,7 +84,9 @@ if (getFileHash() == '') { if (isFileReadable($FQFN)) { // Also update configuration setConfigEntry('secret_key', $secretKey); - updateConfiguration('file_hash', $fileHash); + + // Force update + updateConfiguration('file_hash', $fileHash, '', '0', TRUE); // Remove variables unset($secretKey); @@ -93,7 +95,7 @@ if (getFileHash() == '') { } // END - if // @TODO Rewrite this to a filter -if ((isExtensionInstalledAndNewer('cache', '0.1.2')) && (isCacheInstanceValid())) { +if ((isExtensionInstalledAndNewer('cache', '0.1.2')) && (isValidCacheInstance())) { // Destroy some cache files foreach (array('config', 'extension', 'filter', 'modules') as $cache) { // Use rebuildCache()