aboutsummaryrefslogtreecommitdiff
path: root/app/Models/ConfigurationSetter.php
diff options
context:
space:
mode:
authorGravatar Alexis Degrugillier <github@ainw.org> 2015-09-11 18:45:25 -0400
committerGravatar Alexis Degrugillier <github@ainw.org> 2015-09-11 18:45:25 -0400
commit271d43b5692de4d56f05d38ca802b7807c8743cf (patch)
treea06769438f87171d70ae9e5a64faa55f417fd497 /app/Models/ConfigurationSetter.php
parent5a2bc9261ca5104022ce64e00d0384791b0443d1 (diff)
Fix feed and category side effect
Before, when deleting a feed or a category, the user queries were deleted as well. No matter if they were related or not. Now, they are deleted only if they are related. I this this fix is not the best way to handle that. I think it would be better if we could find a way to create a UserQuery object from the array. The same applies when displaying the user queries in the interface. See #980
Diffstat (limited to 'app/Models/ConfigurationSetter.php')
-rw-r--r--app/Models/ConfigurationSetter.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/Models/ConfigurationSetter.php b/app/Models/ConfigurationSetter.php
index 992a3a387..5c8a1ce29 100644
--- a/app/Models/ConfigurationSetter.php
+++ b/app/Models/ConfigurationSetter.php
@@ -119,6 +119,8 @@ class FreshRSS_ConfigurationSetter {
foreach ($values as $value) {
if ($value instanceof FreshRSS_UserQuery) {
$data['queries'][] = $value->toArray();
+ } elseif (is_array($value)) {
+ $data['queries'][] = $value;
}
}
}