From bbd9e5045ed4276d47bd55124f81b35440849c1d Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 1 Dec 2017 15:03:14 +0300 Subject: controls: start pdo stuff --- include/sanity_check.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/sanity_check.php') diff --git a/include/sanity_check.php b/include/sanity_check.php index a84959f8e..713777585 100755 --- a/include/sanity_check.php +++ b/include/sanity_check.php @@ -91,9 +91,11 @@ } if (SINGLE_USER_MODE) { - $result = db_query("SELECT id FROM ttrss_users WHERE id = 1"); + $pdo = DB::pdo(); - if (db_num_rows($result) != 1) { + $res = $pdo->query("SELECT id FROM ttrss_users WHERE id = 1"); + + if (!$res->fetch()) { array_push($errors, "SINGLE_USER_MODE is enabled in config.php but default admin account is not found."); } } -- cgit v1.2.3-54-g00ecf