]> git.wh0rd.org Git - tt-rss.git/commitdiff
pdo pdo pdo
authorAndrew Dolgov <noreply@madoka.volgo-balt.ru>
Fri, 1 Dec 2017 11:50:10 +0000 (14:50 +0300)
committerAndrew Dolgov <noreply@madoka.volgo-balt.ru>
Fri, 1 Dec 2017 11:50:10 +0000 (14:50 +0300)
include/functions.php

index 07f4f0f641023488d5aca5ba2720485ba8444c07..377d4964741ed2ed7015bc20df32a584843863dd 100644 (file)
 
                if (get_schema_version() < 63) $profile_qpart = "";
 
-               ////db_query("BEGIN");
-
         $pdo = DB::pdo();
 
+        $pdo->beginTransaction();
+
                $sth = $pdo->query("SELECT pref_name,def_value FROM ttrss_prefs");
 
         $profile = $profile ? $profile : null;
                        }
                }
 
-               ////db_query("COMMIT");
+               $pdo->commit();
 
        }
 
 
                if (!$feed_cat) return false;
 
-               ////db_query("BEGIN");
-
                $feed_cat = mb_substr($feed_cat, 0, 250);
 
                $pdo = Db::pdo();
+               $pdo->beginTransaction();
 
                $sth = $pdo->prepare("SELECT id FROM ttrss_feed_categories
                                WHERE (:parent IS NULL AND parent_cat IS NULL OR parent_cat = :parent) 
                                        VALUES (?, ?, ?)");
                        $sth->execute([$_SESSION['uid'], $feed_cat, $parent_cat_id]);
 
-                       //db_query("COMMIT");
+                       $pdo->commit();
 
                        return true;
                }
 
+        $pdo->commit();
+
                return false;
        }