]> git.wh0rd.org - tt-rss.git/blobdiff - backend.php
allow connections to pgsql without password
[tt-rss.git] / backend.php
index a87195c444a79c5235ba3ffd34254a3c36c25e28..38af31c1c2f1de2c43ae5b3a3e2e38abf806a2d4 100644 (file)
@@ -6,7 +6,7 @@
        if (get_magic_quotes_gpc()) {
                $_REQUEST = array_map('stripslashes', $_REQUEST);
                $_POST = array_map('stripslashes', $_POST);
-               $_REQUEST = array_map('stripslashes', $_REQUEST);
+//             $_REQUEST = array_map('stripslashes', $_REQUEST);
                $_COOKIE = array_map('stripslashes', $_COOKIE);
        }
 
                1   => __("Magpie"),
                2   => __("SimplePie"));
 
-       if (ENABLE_SIMPLEPIE) {
+       if (DEFAULT_UPDATE_METHOD == "1") {
                $update_methods[0] .= ' (SimplePie)';
        } else {
                $update_methods[0] .= ' (Magpie)';
 
                case "getUnread":
                        $login = db_escape_string($_REQUEST["login"]);
+                       $fresh = $_REQUEST["fresh"] == "1";
 
                        header("Content-Type: text/plain; charset=utf-8");
 
 
                        if (db_num_rows($result) == 1) {
                                $uid = db_fetch_result($result, 0, "id");
+
                                print getGlobalUnread($link, $uid);
+
+                               if ($fresh) {
+                                       print ";";
+                                       print getFeedArticles($link, -3, false, true, $uid);
+                               }
+
                        } else {
                                print "-1;User not found";
                        }