]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - nixops/modules/websites/tools/tools/ttrss-feediron_json_reformat.patch
Rename virtual folder to nixops
[perso/Immae/Config/Nix.git] / nixops / modules / websites / tools / tools / ttrss-feediron_json_reformat.patch
diff --git a/nixops/modules/websites/tools/tools/ttrss-feediron_json_reformat.patch b/nixops/modules/websites/tools/tools/ttrss-feediron_json_reformat.patch
new file mode 100644 (file)
index 0000000..e1c44d9
--- /dev/null
@@ -0,0 +1,18 @@
+diff --git a/init.php b/init.php
+index 3c0f2f9..1aad146 100644
+--- a/init.php
++++ b/init.php
+@@ -600,10 +600,11 @@ class Feediron extends Plugin implements IHandler
+                       return false;
+               }
+-              $this->host->set($this, 'json_conf', Feediron_Json::format($json_conf));
++                $new_conf = json_encode(json_decode($json_conf), JSON_PRETTY_PRINT);
++                $this->host->set($this, 'json_conf', $new_conf);
+               $json_reply['success'] = true;
+               $json_reply['message'] = __('Configuration saved.');
+-              $json_reply['json_conf'] = Feediron_Json::format($json_conf);
++                $json_reply['json_conf'] = $new_conf;
+               echo json_encode($json_reply);
+       }