summaryrefslogtreecommitdiff
path: root/app/Models/Entry.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-06-03 15:18:04 +0200
committerGravatar GitHub <noreply@github.com> 2017-06-03 15:18:04 +0200
commitfd43ee546e419fc9fbb9a3ad974d2234d94cffaa (patch)
tree2df9fd1daf5b994d7bbde8dd46f7605e4370c268 /app/Models/Entry.php
parentbe0bcfef7e38f27284ec7b377b342ba389515964 (diff)
parent6f3653d430c86b026f8e007a276fdba2b09b61b3 (diff)
Merge pull request #1549 from FreshRSS/dev1.7.0
Version 1.7.0
Diffstat (limited to 'app/Models/Entry.php')
-rw-r--r--app/Models/Entry.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/Models/Entry.php b/app/Models/Entry.php
index a562a963a..26cd24797 100644
--- a/app/Models/Entry.php
+++ b/app/Models/Entry.php
@@ -22,7 +22,6 @@ class FreshRSS_Entry extends Minz_Model {
public function __construct($feed = '', $guid = '', $title = '', $author = '', $content = '',
$link = '', $pubdate = 0, $is_read = false, $is_favorite = false, $tags = '') {
- $this->_guid($guid);
$this->_title($title);
$this->_author($author);
$this->_content($content);
@@ -32,6 +31,7 @@ class FreshRSS_Entry extends Minz_Model {
$this->_isFavorite($is_favorite);
$this->_feed($feed);
$this->_tags(preg_split('/[\s#]/', $tags));
+ $this->_guid($guid);
}
public function id() {
@@ -101,6 +101,12 @@ class FreshRSS_Entry extends Minz_Model {
$this->id = $value;
}
public function _guid($value) {
+ if ($value == '') {
+ $value = $this->link;
+ if ($value == '') {
+ $value = $this->hash();
+ }
+ }
$this->guid = $value;
}
public function _title($value) {