Fix invalid last update timestamp
This commit is contained in:
@@ -45,7 +45,7 @@ class Feed extends PhpObject {
|
|||||||
$this->iFeedId = $iFeedId;
|
$this->iFeedId = $iFeedId;
|
||||||
$asFeed = $this->getFeed();
|
$asFeed = $this->getFeed();
|
||||||
$this->sRefFeedId = $asFeed['ref_feed_id'];
|
$this->sRefFeedId = $asFeed['ref_feed_id'];
|
||||||
$this->iLastUpdate = strtotime($asFeed['last_update']);
|
$this->iLastUpdate = $asFeed['last_update']=='0000-00-00 00:00:00'?0:strtotime($asFeed['last_update']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createFeedId($oProjectId) {
|
public function createFeedId($oProjectId) {
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ function isSettingsPanelOpen() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updateSettingsPanel(asLastUpdate) {
|
function updateSettingsPanel(asLastUpdate) {
|
||||||
var $LastUpdate = self.tmp('$Settings').find('#last_update').toggle(self.vars(['project', 'mode']) == self.consts.modes.blog);
|
var $LastUpdate = self.tmp('$Settings').find('#last_update').toggle(self.vars(['project', 'mode']) == self.consts.modes.blog && asLastUpdate.unix_time > 0);
|
||||||
$LastUpdate.find('abbr')
|
$LastUpdate.find('abbr')
|
||||||
.attr('title', asLastUpdate.formatted_time)
|
.attr('title', asLastUpdate.formatted_time)
|
||||||
.text(oSpot.lang('last_update')+' '+asLastUpdate.relative_time);
|
.text(oSpot.lang('last_update')+' '+asLastUpdate.relative_time);
|
||||||
|
|||||||
Reference in New Issue
Block a user