comparison CacheTimeCheck.inc @ 119:df158368051e

PHP7 compatibility and support for http and https
author Tom Fredrik Blenning Klaussen <bfg@bfgconsult.no>
date Thu, 28 Dec 2017 18:36:45 +0100
parents adf7b11921f4
children
comparison
equal deleted inserted replaced
118:e9f562a34fa5 119:df158368051e
20 if (DEBUG_LEVEL >= VERBOSITY_DEBUG) 20 if (DEBUG_LEVEL >= VERBOSITY_DEBUG)
21 var_dump($_SERVER); 21 var_dump($_SERVER);
22 22
23 $gmdate_mod = toGMTime($cache->getNewest()); 23 $gmdate_mod = toGMTime($cache->getNewest());
24 24
25 if ($_SERVER['REDIRECT_URL'] == '/sitemap.xml') { 25 if (array_key_exists('REDIRECT_URL', $_SERVER) && $_SERVER['REDIRECT_URL'] == '/sitemap.xml') {
26 //print_r($gmdate_mod); 26 //print_r($gmdate_mod);
27 } 27 }
28 28
29 foreach($cache->cacheControl() as $header => $value) { 29 foreach($cache->cacheControl() as $header => $value) {
30 header ("${header}: ${value}"); 30 header ("${header}: ${value}");