diff options
Diffstat (limited to 'app/Models')
| -rw-r--r-- | app/Models/Category.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/Models/Category.php b/app/Models/Category.php index 49ef2d283..230431311 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -124,7 +124,7 @@ class FreshRSS_Category extends Minz_Model { public function _id(int $id): void { $this->id = $id; if ($id === FreshRSS_CategoryDAO::DEFAULTCATEGORYID) { - $this->_name(_t('gen.short.default_category')); + $this->name = _t('gen.short.default_category'); } } @@ -133,7 +133,9 @@ class FreshRSS_Category extends Minz_Model { } public function _name(string $value): void { - $this->name = mb_strcut(trim($value), 0, FreshRSS_DatabaseDAO::LENGTH_INDEX_UNICODE, 'UTF-8'); + if ($this->id !== FreshRSS_CategoryDAO::DEFAULTCATEGORYID) { + $this->name = mb_strcut(trim($value), 0, FreshRSS_DatabaseDAO::LENGTH_INDEX_UNICODE, 'UTF-8'); + } } /** @param array<FreshRSS_Feed>|FreshRSS_Feed $values */ |
