Everybody likes resource friendlier and more understandable code.

parent 8a8f9bb8
Pipeline #833 passed with stage
in 2 minutes and 15 seconds
......@@ -459,13 +459,13 @@ if (!$_domain) {
if (Carbon::createFromFormat('Y-m-d H:i:s.u', getMeta('cacert_updated', 'date_created'))->diffInHours() > 40) {
$cacert = c('cafullpath');
file_put_contents($cacert, file_get_contents("https://curl.haxx.se/ca/cacert.pem"));
copy('https://curl.haxx.se/ca/cacert.pem', $cacert);
updateMeta('cacert_updated');
}
if (Carbon::createFromFormat('Y-m-d H:i:s.u', getMeta('geoip_updated', 'date_created'))->diffInHours() > 45) {
$geo2ip = c('geoip2db');
file_put_contents($geo2ip, file_get_contents("compress.zlib://http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz"));
copy('compress.zlib://http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz', $geo2ip);
updateMeta('geoip_updated');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment