X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Floader%2Fload_cache-revision.php;h=d15d410c30a41aae86a776ab6d0582f1c6dbbcfa;hb=5119510b066e7d05bceb19fd24a2287113a6190f;hp=1c2f3971fae4a5682047c2949c30447ed55c1e67;hpb=5c2fa5bcdb71881440947473ddef3612d9a2f2e1;p=mailer.git diff --git a/inc/loader/load_cache-revision.php b/inc/loader/load_cache-revision.php index 1c2f3971fa..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 ((getOutputMode() != '1') && (getOutputMode() != '-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(getArrayFromActualVersion()); + $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] ?>