diff options
| author | 2025-10-14 11:01:23 +0200 | |
|---|---|---|
| committer | 2025-10-14 11:01:23 +0200 | |
| commit | 20ecbeb09cdf05ca3ffd44980e9070b34c2b71ec (patch) | |
| tree | f5cc8b852b6a10f24707349677b3d11eebde0c45 /app/Controllers | |
| parent | 201c113041c97d6ba6d02fd851be02ac84a11780 (diff) | |
Fix drag&drop of user query losing information (#8113)
* Fix drag&drop of user query losing information
Information about RSS sharing was lost after a drag&drop
* Fix related type cast
Diffstat (limited to 'app/Controllers')
| -rw-r--r-- | app/Controllers/configureController.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php index bcda947ff..aedb7a2e6 100644 --- a/app/Controllers/configureController.php +++ b/app/Controllers/configureController.php @@ -346,7 +346,8 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController { FreshRSS_View::appendScript(Minz_Url::display('/scripts/draggable.js?' . @filemtime(PUBLIC_PATH . '/scripts/draggable.js'))); if (Minz_Request::isPost()) { - /** @var array<int,array{get?:string,name?:string,order?:string,search?:string,state?:int,url?:string,token?:string}> $params */ + /** @var array<int,array{get?:string,name?:string,order?:string,search?:string,state?:int,url?:string,token?:string, + * shareRss?:bool|numeric-string,shareOpml?:bool|numeric-string,description?:string,imageUrl?:string}> $params */ $params = Minz_Request::paramArray('queries'); $queries = []; @@ -358,6 +359,10 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController { if (!empty($query['search'])) { $query['search'] = urldecode($query['search']); } + $shareRss = $query['shareRss'] ?? null; + $query['shareRss'] = (is_string($shareRss) && ctype_digit($shareRss)) ? (bool)$shareRss : false; + $shareOpml = $query['shareOpml'] ?? null; + $query['shareOpml'] = (is_string($shareOpml) && ctype_digit($shareOpml)) ? (bool)$shareOpml : false; $queries[$key] = (new FreshRSS_UserQuery($query, FreshRSS_Context::categories(), FreshRSS_Context::labels()))->toArray(); } FreshRSS_Context::userConf()->queries = $queries; |
