/** @var array List of bookmark's tags */
protected $tags;
- /** @var string Thumbnail's URL - false if no thumbnail could be found */
+ /** @var string|bool|null Thumbnail's URL - initialized at null, false if no thumbnail could be found */
protected $thumbnail;
/** @var bool Set to true if the bookmark is set as sticky */
throw new InvalidBookmarkException($this);
}
if (empty($this->url)) {
- $this->url = '?'. $this->shortUrl;
+ $this->url = '/shaare/'. $this->shortUrl;
}
if (empty($this->title)) {
$this->title = $this->url;
/**
* Get the Thumbnail.
*
- * @return string|bool|null
+ * @return string|bool|null Thumbnail's URL - initialized at null, false if no thumbnail could be found
*/
public function getThumbnail()
{
/**
* Set the Thumbnail.
*
- * @param string|bool $thumbnail
+ * @param string|bool $thumbnail Thumbnail's URL - false if no thumbnail could be found
*
* @return Bookmark
*/
public function isNote()
{
// We check empty value to get a valid result if the link has not been saved yet
- return empty($this->url) || $this->url[0] === '?';
+ return empty($this->url) || startsWith($this->url, '/shaare/') || $this->url[0] === '?';
}
/**