Fix no messages in feed warnings
This commit is contained in:
@@ -66,6 +66,8 @@ class Feed extends PhpObject {
|
||||
|
||||
private function updateFeed() {
|
||||
$asData = $this->retrieveFeed();
|
||||
$sLastUpdate = date(Db::TIMESTAMP_FORMAT);
|
||||
if(!isset($asData['response']['errors']) || empty($asData['response']['errors'])) {
|
||||
$asMsgs = $asData['response']['feedMessageResponse']['messages'];
|
||||
$asFeed = $asData['response']['feedMessageResponse']['feed'];
|
||||
|
||||
@@ -87,7 +89,7 @@ class Feed extends PhpObject {
|
||||
'name' => $asFeed['name'],
|
||||
'description' => $asFeed['description'],
|
||||
'status' => $asFeed['status'],
|
||||
'last_update' => date(Db::TIMESTAMP_FORMAT)
|
||||
'last_update' => $sLastUpdate
|
||||
);
|
||||
$iFeedId = $this->oDb->insertUpdateRow(self::FEED_TABLE, $asFeedInfo, array('ref_feed_id'));
|
||||
|
||||
@@ -110,6 +112,8 @@ class Feed extends PhpObject {
|
||||
}
|
||||
}
|
||||
}
|
||||
else $this->oDb->updateRow(self::FEED_TABLE, $this->iFeedId, array('last_update'=>$sLastUpdate));
|
||||
}
|
||||
|
||||
private function retrieveFeed() {
|
||||
$sUrl = self::FEED_HOOK.$this->sRefFeedId.self::FEED_TYPE_JSON;
|
||||
|
||||
Reference in New Issue
Block a user