Răsfoiți Sursa

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
Alexis Degrugillier 10 ani în urmă
părinte
comite
271d43b569
1 a modificat fișierele cu 2 adăugiri și 0 ștergeri
  1. 2 0
      app/Models/ConfigurationSetter.php

+ 2 - 0
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;
 			}
 		}
 	}