diff options
| author | 2024-06-06 02:44:38 +0800 | |
|---|---|---|
| committer | 2024-06-05 20:44:38 +0200 | |
| commit | 2ed58f814eab9c3bbdada6b8e2ebfccfc9395894 (patch) | |
| tree | e949b1cce6842490eca9c5490ead7903ca7bfb33 /app/Models/UserQuery.php | |
| parent | e17c2c447906deb471e25cdc889b9f74e1d715d2 (diff) | |
add image and description to user query share (#6541)
* add description to user queries and rss feed
* add image url to user queries and rss feed
* Fix i18n
* remove itunes image tag and xml definition
---------
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'app/Models/UserQuery.php')
| -rw-r--r-- | app/Models/UserQuery.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/app/Models/UserQuery.php b/app/Models/UserQuery.php index 6f7996b07..73bf52ef8 100644 --- a/app/Models/UserQuery.php +++ b/app/Models/UserQuery.php @@ -25,6 +25,8 @@ class FreshRSS_UserQuery { private array $categories; /** @var array<int,FreshRSS_Tag> $labels */ private array $labels; + private string $description = ''; + private string $imageUrl = ''; public static function generateToken(string $salt): string { if (!FreshRSS_Context::hasSystemConf()) { @@ -77,6 +79,12 @@ class FreshRSS_UserQuery { if (isset($query['shareOpml'])) { $this->shareOpml = $query['shareOpml']; } + if (isset($query['description'])) { + $this->description = $query['description']; + } + if (isset($query['imageUrl'])) { + $this->imageUrl = $query['imageUrl']; + } // linked too deeply with the search object, need to use dependency injection $this->search = new FreshRSS_BooleanSearch($query['search'], 0, 'AND', false); @@ -101,6 +109,8 @@ class FreshRSS_UserQuery { 'token' => $this->token, 'shareRss' => $this->shareRss, 'shareOpml' => $this->shareOpml, + 'description' => $this->description, + 'imageUrl' => $this->imageUrl, ]); } @@ -282,4 +292,20 @@ class FreshRSS_UserQuery { } return ''; } + + public function getDescription(): string { + return $this->description; + } + + public function setDescription(string $description): void { + $this->description = $description; + } + + public function getImageUrl(): string { + return $this->imageUrl; + } + + public function setImageUrl(string $imageUrl): void { + $this->imageUrl = $imageUrl; + } } |
