]> git.wh0rd.org Git - tt-rss.git/commitdiff
UNDO: change sprintf() to proper is_int() checking
authorAndrew Dolgov <fox@bah.spb.su>
Tue, 29 Nov 2005 13:14:53 +0000 (14:14 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Tue, 29 Nov 2005 13:14:53 +0000 (14:14 +0100)
backend.php

index 5c7fa491b7497649144b19c50fb72965088d8323..f79d7249e1edd7c62c6ca47ae860a8812d926f4b 100644 (file)
                                </head><body onload='init()'>";
                }
 
-               if ($subop == "ForceUpdate" && is_int($feed)) {
+               if ($subop == "ForceUpdate" && sprintf("%d", $feed) > 0) {
 
                        $tmp_result = db_query($link, "SELECT feed_url FROM ttrss_feeds
                                WHERE id = '$feed'");
 
                if ($subop == "MarkAllRead")  {
 
-                       if (is_int($feed)) {
+                       if (sprintf("%d", $feed) != 0) {
                        
                                if ($feed > 0) {
                                        db_query($link, "UPDATE ttrss_user_entries 
                        $query_strategy_part = "id > 0";
                        $vfeed_query_part = "(SELECT title FROM ttrss_feeds WHERE
                                id = feed_id) as feed_title,";
-               } else if (is_int($feed)) {
+               } else if (sprintf("%d", $feed) == 0) {
                        $query_strategy_part = "ttrss_entries.id > 0";
                        $vfeed_query_part = "(SELECT title FROM ttrss_feeds WHERE
                                id = feed_id) as feed_title,";
 
                if ($search && $search_mode == "All feeds") {
                        $feed_title = "Search results";
-               } else if (is_int($feed)) {
+               } else if (sprintf("%d", $feed) == 0) {
                        $feed_title = $feed;
                } else if ($feed > 0) {
                        $result = db_query($link, "SELECT title,site_url FROM ttrss_feeds 
 
                if ($feed < -10) error_reporting (0);
 
-               if (is_int($feed) != 0) {
+               if (sprintf("%d", $feed) != 0) {
 
                        if ($feed > 0) {                        
                                $feed_kind = "Feeds";