X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fgen_sql_patches.php;h=3e780dcac39499dbd74334881b43631fbf8bf5d6;hp=14158396a60b7650dde95a505a14ebac8064cf4a;hb=e5dffd4249c97200cbad02f3f4eaf5c373fdb89a;hpb=7858ec10092071d595c3814264c537cd16695875 diff --git a/inc/gen_sql_patches.php b/inc/gen_sql_patches.php index 14158396a6..3e780dcac3 100644 --- a/inc/gen_sql_patches.php +++ b/inc/gen_sql_patches.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -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);