X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Floader%2Fload_cache-revision.php;h=d15d410c30a41aae86a776ab6d0582f1c6dbbcfa;hb=24a98fb5ba785b3f6b8cb6f8e9acc0f19c37ab5d;hp=fc4b883dd4e6979265dfb3aaf57ee23819770889;hpb=3f0394273dd3c007dc02d9a3d48e2f8af1572b07;p=mailer.git diff --git a/inc/loader/load_cache-revision.php b/inc/loader/load_cache-revision.php index fc4b883dd4..d15d410c30 100644 --- a/inc/loader/load_cache-revision.php +++ b/inc/loader/load_cache-revision.php @@ -1,7 +1,7 @@ loadCacheFile("revision", true))) { +if ($GLOBALS['cache_instance']->loadCacheFile('revision')) { // Load revision from cache $GLOBALS['cache_array']['revision'] = $GLOBALS['cache_instance']->getArrayFromCache(); -} elseif (($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1")) { +} elseif ((isHtmlOutputMode())) { // Create cache file here - $GLOBALS['cache_instance']->init("REVISION"); + $GLOBALS['cache_instance']->init(); // add the new RevInfos in and saves it to the cache - $GLOBALS['cache_instance']->addRow(getAkt_vers()); + $GLOBALS['cache_instance']->addRow(getArrayFromRepositoryData()); // Close the cache $GLOBALS['cache_instance']->finalize(); - // Include loader again - require(__FILE__); + // Generate FQFN for old revision file + $FQFN = sprintf("%s/.revision", getCachePath()); + + // Is it there? + if (isFileReadable($FQFN)) { + // Then remove it + removeFile($FQFN); + } // END - if } -// +// [EOF] ?>