X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fgen_sql_patches.php;h=783124e1b48d57dfc63436aa25dd80090460837a;hb=76d12babd2a9d963c89466490d844944246f2834;hp=7491cd16ae41d36392a5ac6f40f7dc969aa47751;hpb=c8d76610eb94093d4eed4fcd8a6cb72e74c8f6d8;p=mailer.git diff --git a/inc/gen_sql_patches.php b/inc/gen_sql_patches.php index 7491cd16ae..783124e1b4 100644 --- a/inc/gen_sql_patches.php +++ b/inc/gen_sql_patches.php @@ -16,8 +16,8 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009, 2010 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -68,8 +68,9 @@ if (getMasterSalt() == '') { if (getFileHash() == '') { // Create filename from hashed random string $fileHash = sha1(generatePassword(mt_rand(128, 256))); - $FQFN = sprintf("%sinc/cache/.%s.cache", + $FQFN = sprintf("%s%s.%s.cache", getPath(), + getCachePath(), $fileHash ); @@ -94,9 +95,13 @@ if (getFileHash() == '') { // @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(); + foreach (array('config', 'extension', 'filter', 'modules') as $cache) { + // Is the cache file there? + if ($GLOBALS['cache_instance']->loadCacheFile($cache)) { + // Then remove it + $GLOBALS['cache_instance']->removeCacheFile(); + } // END - if + } // END - foreach } // END - if // [EOF]