]> git.wh0rd.org - tt-rss.git/blobdiff - plugins/instances/init.php
add a wrapper for standard error codes returned by backend, also add explanation...
[tt-rss.git] / plugins / instances / init.php
index aac28196f2e18d8b727a760e7d2638e2f4c6acf8..b23f45a0184331a15ee0637dedb8878eedfc2b65 100644 (file)
@@ -384,7 +384,7 @@ class Instances extends Plugin implements IHandler {
 
                        print json_encode(array("feeds" => $feeds));
                } else {
-                       print json_encode(array("error" => array("code" => 6)));
+                       print error_json(6);
                }
        }
 
@@ -407,7 +407,7 @@ class Instances extends Plugin implements IHandler {
 
                print "<hr/>";
 
-               $access_key = sha1(uniqid(rand(), true));
+               $access_key = uniqid(rand(), true);
 
                /* Access key */
 
@@ -439,7 +439,7 @@ class Instances extends Plugin implements IHandler {
        }
 
        function genHash() {
-               $hash = sha1(uniqid(rand(), true));
+               $hash = uniqid(base_convert(rand(), 10, 36));
 
                print json_encode(array("hash" => $hash));
        }