mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-04-25 08:47:52 -04:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user