diff options
Diffstat (limited to 'app/Models/Category.php')
| -rw-r--r-- | app/Models/Category.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/Models/Category.php b/app/Models/Category.php index 197faf942..240dbca73 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -30,7 +30,7 @@ class FreshRSS_Category extends Minz_Model { } public function nbFeed() { if ($this->nbFeed < 0) { - $catDAO = new FreshRSS_CategoryDAO(); + $catDAO = FreshRSS_Factory::createCategoryDao(); $this->nbFeed = $catDAO->countFeed($this->id()); } @@ -38,7 +38,7 @@ class FreshRSS_Category extends Minz_Model { } public function nbNotRead() { if ($this->nbNotRead < 0) { - $catDAO = new FreshRSS_CategoryDAO(); + $catDAO = FreshRSS_Factory::createCategoryDao(); $this->nbNotRead = $catDAO->countNotRead($this->id()); } @@ -68,7 +68,7 @@ class FreshRSS_Category extends Minz_Model { $this->id = $value; } public function _name($value) { - $this->name = mb_strcut(trim($value), 0, 255, 'UTF-8'); + $this->name = trim($value); } public function _feeds($values) { if (!is_array($values)) { |
