diff options
| author | fisharebest <fisharebest@gmail.com> | 2010-04-14 17:10:47 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2010-04-14 17:10:47 +0000 |
| commit | d6bd81d4b18b3a97a26e06e7f54f1f5602b9cbef (patch) | |
| tree | 3414719d8adcd1f924e68fc1e30cc3f0c179bbd4 /includes/index_cache.php | |
| parent | fbeac796c9d96deb89bfccf12be80641bf5b6288 (diff) | |
| download | webtrees-d6bd81d4b18b3a97a26e06e7f54f1f5602b9cbef.tar.gz webtrees-d6bd81d4b18b3a97a26e06e7f54f1f5602b9cbef.tar.bz2 webtrees-d6bd81d4b18b3a97a26e06e7f54f1f5602b9cbef.zip | |
Make block initialisation consistent
Diffstat (limited to 'includes/index_cache.php')
| -rw-r--r-- | includes/index_cache.php | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/includes/index_cache.php b/includes/index_cache.php index 3ae31a4cde..7526163f62 100644 --- a/includes/index_cache.php +++ b/includes/index_cache.php @@ -50,11 +50,7 @@ function loadCachedBlock($block, $index) { } //-- ignore cache when its life is not configured or when its life is zero - $cacheLife = 0; - if (isset($block[1]['cache'])) $cacheLife = $block[1]['cache']; - else { - if (isset($WT_BLOCKS[$block[0]]['config']['cache'])) $cacheLife = $WT_BLOCKS[$block[0]]['config']['cache']; - } + $cacheLife = $WT_BLOCKS[$block[0]]['config']['cache']; if ($cacheLife==0) return false; $fname = "{$INDEX_DIRECTORY}/cache/{$theme_name}/".WT_LOCALE."/".WT_GEDCOM."/{$index}_{$block[0]}"; @@ -90,12 +86,7 @@ function saveCachedBlock($block, $index, $content) { } //-- ignore cache when its life is not configured or when its life is zero - $cacheLife = 0; - if (isset($block[1]['cache'])) { - $cacheLife = $block[1]['cache']; - } elseif (isset($WT_BLOCKS[$block[0]]['config']['cache'])) { - $cacheLife = $WT_BLOCKS[$block[0]]['config']['cache']; - } + $cacheLife=$WT_BLOCKS[$block[0]]['config']['cache']; if ($cacheLife==0) { return false; } |
