diff options
| author | 2019-07-25 16:51:48 +0200 | |
|---|---|---|
| committer | 2019-07-25 16:51:48 +0200 | |
| commit | 82611c9622ed23b0e9fcf5f9f651ddffa1fd7706 (patch) | |
| tree | fc2c97fd8dd84ec30473cb85b889d8326c9a831a /app/Models | |
| parent | 744a9e8cf00aef7dec0acfa5f90f0dcfa2ef8837 (diff) | |
| parent | 042b40eeeea77db854daab1bec96fce5c2cdd4b2 (diff) | |
Merge pull request #2451 from FreshRSS/dev1.14.3
FreshRSS 1.14.3
Diffstat (limited to 'app/Models')
| -rw-r--r-- | app/Models/Category.php | 7 | ||||
| -rw-r--r-- | app/Models/CategoryDAO.php | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/app/Models/Category.php b/app/Models/Category.php index 240dbca73..fa711aa66 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -7,6 +7,7 @@ class FreshRSS_Category extends Minz_Model { private $nbNotRead = -1; private $feeds = null; private $hasFeedsWithError = false; + private $isDefault = false; public function __construct($name = '', $feeds = null) { $this->_name($name); @@ -28,6 +29,9 @@ class FreshRSS_Category extends Minz_Model { public function name() { return $this->name; } + public function isDefault() { + return $this->isDefault; + } public function nbFeed() { if ($this->nbFeed < 0) { $catDAO = FreshRSS_Factory::createCategoryDao(); @@ -70,6 +74,9 @@ class FreshRSS_Category extends Minz_Model { public function _name($value) { $this->name = trim($value); } + public function _isDefault($value) { + $this->isDefault = $value; + } public function _feeds($values) { if (!is_array($values)) { $values = array($values); diff --git a/app/Models/CategoryDAO.php b/app/Models/CategoryDAO.php index ba7eb765e..6535adae7 100644 --- a/app/Models/CategoryDAO.php +++ b/app/Models/CategoryDAO.php @@ -282,6 +282,7 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable $dao['name'] ); $cat->_id($dao['id']); + $cat->_isDefault(static::DEFAULTCATEGORYID === intval($dao['id'])); $list[$key] = $cat; } |
