]> git.wh0rd.org - tt-rss.git/blobdiff - include/functions.php
ccache, misc: fixes
[tt-rss.git] / include / functions.php
index 8d25457c9f8a9f1a08f27e9fe5737e1ef1d8259c..c28460dff1e330036db1c6611c8342dbf9fbb4ca 100644 (file)
 
                $u_sth = $pdo->prepare("SELECT pref_name
                        FROM ttrss_user_prefs WHERE owner_uid = :uid AND 
-                               profile = :profile OR (:profile IS NULL AND profile IS NULL)");
+                               (profile = :profile OR (:profile IS NULL AND profile IS NULL))");
                $u_sth->execute([':uid' => $uid, ':profile' => $profile]);
 
                $active_prefs = array();
                $pdo->beginTransaction();
 
                $sth = $pdo->prepare("SELECT id FROM ttrss_feed_categories
-                               WHERE (:parent IS NULL AND parent_cat IS NULL OR parent_cat = :parent
+                               WHERE (parent_cat = :parent OR (:parent IS NULL AND parent_cat IS NULL)
                                AND title = :cat AND owner_uid = :uid");
                $sth->execute([':parent' => $parent_cat_id, ':title' => $feed_cat, ':uid' => $_SESSION['uid']]);