]> git.wh0rd.org Git - tt-rss.git/commitdiff
boolean handling changes which probably won't break everything
authorAndrew Dolgov <noreply@fakecake.org>
Sat, 2 Dec 2017 11:02:01 +0000 (14:02 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Sat, 2 Dec 2017 11:02:01 +0000 (14:02 +0300)
classes/opml.php
include/functions.php

index 03156b79f2755509ccaf19f257ea23d6f3d3a77a..5f70558b6c15189817cb1b7a6673d151a855145e 100644 (file)
@@ -364,6 +364,8 @@ class Opml extends Handler_Protected {
                                $inverse = bool_to_sql_bool($filter["inverse"]);
                                $title = $filter["title"];
 
+                               print "F: $title, $inverse, $enabled, $match_any_rule";
+
                                $sth = $this->pdo->prepare("INSERT INTO ttrss_filters2 (match_any_rule,enabled,inverse,title,owner_uid)
                                        VALUES (?, ?, ?, ?, ?)");
 
index 31a0300d75428733241358be45b306ce1dc20d9f..0b301b82e0f3b34faed5320503c125a4b255d979 100644 (file)
        }
 
        function sql_bool_to_bool($s) {
-               if ($s == "t" || $s == "1" || strtolower($s) == "true") {
-                       return true;
-               } else {
-                       return false;
-               }
+               return $s; //no-op for PDO
        }
 
        function bool_to_sql_bool($s) {
-               if ($s) {
-                       return "true";
-               } else {
-                       return "false";
-               }
+               return (bool)$s; //no-op for PDO
        }
 
        // Session caching removed due to causing wrong redirects to upgrade