Compare commits

...

3 Commits

Author SHA1 Message Date
a7b552fe4a Idiot-proof unstable spot api parsing (messages) 2019-09-01 00:17:21 +02:00
e2e5df5414 Update feeds once an hour (clean commit) 2019-09-01 00:17:21 +02:00
6a9c563df1 Revert "Update feeds once an hour"
This reverts commit abad39eaa8.
2019-09-01 00:17:11 +02:00

View File

@@ -60,7 +60,7 @@ class Feed extends PhpObject {
}
public function checkUpdateFeed($sProjectMode) {
//Feed updated once an hour in Blog Mode
//Feed updated once a day in Blog Mode
if($sProjectMode == Project::MODE_BLOG && date('Y-m-d-H', $this->iLastUpdate) != date('Y-m-d-H')) $this->updateFeed();
}
@@ -68,7 +68,9 @@ class Feed extends PhpObject {
$asData = $this->retrieveFeed();
$sLastUpdate = date(Db::TIMESTAMP_FORMAT);
if(!isset($asData['response']['errors']) || empty($asData['response']['errors'])) {
$asMsgs = $asData['response']['feedMessageResponse']['messages']['message'];
$asMsgs = $asData['response']['feedMessageResponse']['messages'];
if(array_key_exists('message', $asMsgs)) $asMsgs = $asMsgs['message'];
$asFeed = $asData['response']['feedMessageResponse']['feed'];
if(!empty($asMsgs))