diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Db/Item.php | 16 | ||||
-rwxr-xr-x | lib/Fetcher/FeedFetcher.php | 2 | ||||
-rw-r--r-- | lib/Migration/Version150302Date20210312231251.php | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/Db/Item.php b/lib/Db/Item.php index a987159f8..f72330c2f 100644 --- a/lib/Db/Item.php +++ b/lib/Db/Item.php @@ -64,7 +64,7 @@ class Item extends Entity implements IAPI, \JsonSerializable /** @var bool */ protected $starred = false; /** @var string|null */ - protected $tags; + protected $categories; public function __construct() { @@ -87,7 +87,7 @@ class Item extends Entity implements IAPI, \JsonSerializable $this->addType('fingerprint', 'string'); $this->addType('unread', 'boolean'); $this->addType('starred', 'boolean'); - $this->addType('tags', 'string'); + $this->addType('categories', 'string'); } /** @@ -281,9 +281,9 @@ class Item extends Entity implements IAPI, \JsonSerializable /** * @return null|string */ - public function getTags(): ?string + public function getCategories(): ?string { - return $this->tags; + return $this->categories; } /** @@ -516,11 +516,11 @@ class Item extends Entity implements IAPI, \JsonSerializable return $this; } - public function setTags(string $tags = null): self + public function setCategories(string $categories = null): self { - if ($this->tags !== $tags) { - $this->tags = $tags; - $this->markFieldUpdated('tags'); + if ($this->categories !== $categories) { + $this->categories = $categories; + $this->markFieldUpdated('categories'); } return $this; diff --git a/lib/Fetcher/FeedFetcher.php b/lib/Fetcher/FeedFetcher.php index ea1a188ce..7840c8cfd 100755 --- a/lib/Fetcher/FeedFetcher.php +++ b/lib/Fetcher/FeedFetcher.php @@ -261,7 +261,7 @@ class FeedFetcher implements IFeedFetcher $categories[] = $this->decodeTwice($category->getLabel()); } if (count($categories) > 0) { - $item->setTags(implode(',', $categories)); + $item->setCategories(implode(',', $categories)); } // Use description from feed if body is not provided (by a scraper) diff --git a/lib/Migration/Version150302Date20210312231251.php b/lib/Migration/Version150302Date20210312231251.php index dddfbc0a9..70595239e 100644 --- a/lib/Migration/Version150302Date20210312231251.php +++ b/lib/Migration/Version150302Date20210312231251.php @@ -34,7 +34,7 @@ class Version150302Date20210312231251 extends SimpleMigrationStep { if ($schema->hasTable('news_items')) { $table = $schema->getTable('news_items'); - $table->addColumn('tags', 'text', [ + $table->addColumn('categories', 'text', [ 'notnull' => false ]); } |