Move Global Functions - Part 3
authorPhilipp Holzer <admin@philipp.info>
Sat, 20 Oct 2018 16:22:13 +0000 (18:22 +0200)
committerPhilipp Holzer <admin@philipp.info>
Sat, 20 Oct 2018 16:22:13 +0000 (18:22 +0200)
- Replaced every CACHE_ definition

curweather/curweather.php
openstreetmap/openstreetmap.php

index c4cf3ab..db244c7 100644 (file)
@@ -92,7 +92,7 @@ function getWeather($loc, $units = 'metric', $lang = 'en', $appid = '', $cacheti
        ];
 
        PConfig::set(local_user(), 'curweather', 'last', $now->getTimestamp());
-       Cache::set('curweather'.md5($url), serialize($r), CACHE_HOUR);
+       Cache::set('curweather'.md5($url), serialize($r), Cache::HOUR);
 
        return $r;
 }
index 0420591..a1cdd3a 100644 (file)
@@ -132,7 +132,7 @@ function openstreetmap_get_coordinates($a, &$b)
                $curlResult = Network::curl($nomserver . $args);
                if ($curlResult->isSuccess()) {
                        $j = json_decode($curlResult->getBody(), true);
-                       Cache::set($cachekey, $j, CACHE_MONTH);
+                       Cache::set($cachekey, $j, Cache::MONTH);
                }
        }