diff --git a/lib/Db/Bookmark.php b/lib/Db/Bookmark.php index 3eeee6482..f93bf0ac5 100644 --- a/lib/Db/Bookmark.php +++ b/lib/Db/Bookmark.php @@ -15,8 +15,6 @@ * @package OCA\Bookmarks\Db * @method string getUrl() * @method setUrl(string $url) - * @method string getTitle() - * @method string getDescription() * @method int getLastmodified() * @method setLastmodified(int $lastmodified) * @method int getAdded() @@ -111,6 +109,10 @@ public function setTitle(string $title): void { $this->setter('title', [$title]); } + public function getTitle(): string { + return $this->title ?? ''; + } + public function setDescription(string $desc): void { // Cap title length at 1024 because the DB doesn't have more space currently (4096 byte with utf8mb4) if (strlen($desc) > 1024) { @@ -121,6 +123,10 @@ public function setDescription(string $desc): void { $this->setter('description', [$desc]); } + public function getDescription(): string { + return $this->title ?? ''; + } + public function setTextContent(?string $content): void { if ($content !== null) { // Remove non-utf-8 characters from string: https://stackoverflow.com/questions/1401317/remove-non-utf8-characters-from-string