News items use new pubupdatedt instead of editeddt
This commit is contained in:
@@ -10,7 +10,7 @@ class NewsController extends Controller
|
||||
private static $CALENDAR_CATEGORY = 42;
|
||||
private static $BASE_SQL = <<<QUERY
|
||||
SELECT `news`.`id`, `content`.`title`, `content`.`content`, `news`.`podcast` AS `podcast_id`, `news`.`video`, `news`.`keywords`, `news`.`titlewithdate`,
|
||||
`news`.`creationdt` AS `published`, `content`.`creator`, `content`.`editingdt` AS `edited`, `content`.`editor`,
|
||||
`news`.`creationdt` AS `published`, `content`.`creator`, `news`.`pubupdatedt` AS `edited`,
|
||||
`news`.`startdt` AS `starts`, `news`.`enddt` AS `ends`,
|
||||
`content`.`showsource` AS `showsource`, `sources`.`title` AS `source`, `sources`.`url` AS `source_url`,
|
||||
`themes`.`title` AS `theme`, `themes`.`thumbnail` AS `theme_thumbnail`, `regions`.`title` AS `region`, `regions`.`slug` as `region_slug`
|
||||
|
||||
@@ -29,10 +29,10 @@ class NewsItem extends Model {
|
||||
parent::ConvertToDateTime($this->published);
|
||||
parent::ConvertToDateTime($this->edited);
|
||||
|
||||
if($this->edited && ($this->edited->getTimestamp() - $this->published->getTimestamp() < 1800 /* == 30 minutes */)) {
|
||||
// If last edit was within grace period, consider it unedited (note: currently RES always saves edited == published on creation)
|
||||
$this->edited = null;
|
||||
}
|
||||
//if($this->edited && ($this->edited->getTimestamp() - $this->published->getTimestamp() < 1800 /* == 30 minutes */)) {
|
||||
// // If last edit was within grace period, consider it unedited (note: currently RES always saves edited == published on creation)
|
||||
// $this->edited = null;
|
||||
//}
|
||||
|
||||
$this->source = null;
|
||||
if(isset($data->source))
|
||||
|
||||
Reference in New Issue
Block a user