mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-10-22 03:04:31 -04:00
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
This commit is contained in:
1 parent
201c113041
commit
20ecbeb09c
4 files changed
+14
-6
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user