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>
This commit is contained in:
Thomas White
2024-06-06 02:44:38 +08:00
committed by GitHub
parent e17c2c4479
commit 2ed58f814e
30 changed files with 98 additions and 1 deletions

View File

@@ -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;
}
}