fix several cases of Db class being invoked as wrong name (as DB)
This commit is contained in:
parent
16c86e2fc3
commit
e3adacc588
|
@ -652,7 +652,7 @@ class Article extends Handler_Protected {
|
||||||
}
|
}
|
||||||
|
|
||||||
static function getLastArticleId() {
|
static function getLastArticleId() {
|
||||||
$pdo = DB::pdo();
|
$pdo = Db::pdo();
|
||||||
|
|
||||||
$sth = $pdo->prepare("SELECT ref_id AS id FROM ttrss_user_entries
|
$sth = $pdo->prepare("SELECT ref_id AS id FROM ttrss_user_entries
|
||||||
WHERE owner_uid = ? ORDER BY ref_id DESC LIMIT 1");
|
WHERE owner_uid = ? ORDER BY ref_id DESC LIMIT 1");
|
||||||
|
|
|
@ -42,7 +42,7 @@ class Counters {
|
||||||
|
|
||||||
array_push($ret, $cv);
|
array_push($ret, $cv);
|
||||||
|
|
||||||
$pdo = DB::pdo();
|
$pdo = Db::pdo();
|
||||||
|
|
||||||
$sth = $pdo->prepare("SELECT fc.id,
|
$sth = $pdo->prepare("SELECT fc.id,
|
||||||
SUM(CASE WHEN unread THEN 1 ELSE 0 END) AS count,
|
SUM(CASE WHEN unread THEN 1 ELSE 0 END) AS count,
|
||||||
|
|
|
@ -2097,7 +2097,7 @@ class Feeds extends Handler_Protected {
|
||||||
|
|
||||||
static function feed_purge_interval($feed_id) {
|
static function feed_purge_interval($feed_id) {
|
||||||
|
|
||||||
$pdo = DB::pdo();
|
$pdo = Db::pdo();
|
||||||
|
|
||||||
$sth = $pdo->prepare("SELECT purge_interval, owner_uid FROM ttrss_feeds
|
$sth = $pdo->prepare("SELECT purge_interval, owner_uid FROM ttrss_feeds
|
||||||
WHERE id = ?");
|
WHERE id = ?");
|
||||||
|
|
|
@ -74,7 +74,7 @@ function print_feed_multi_select($id, $default_ids = [],
|
||||||
$attributes = "", $include_all_feeds = true,
|
$attributes = "", $include_all_feeds = true,
|
||||||
$root_id = null, $nest_level = 0) {
|
$root_id = null, $nest_level = 0) {
|
||||||
|
|
||||||
$pdo = DB::pdo();
|
$pdo = Db::pdo();
|
||||||
|
|
||||||
print_r(in_array("CAT:6",$default_ids));
|
print_r(in_array("CAT:6",$default_ids));
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ function print_feed_cat_select($id, $default_id,
|
||||||
print "<select id=\"$id\" name=\"$id\" default=\"$default_id\" $attributes>";
|
print "<select id=\"$id\" name=\"$id\" default=\"$default_id\" $attributes>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$pdo = DB::pdo();
|
$pdo = Db::pdo();
|
||||||
|
|
||||||
if (!$root_id) $root_id = null;
|
if (!$root_id) $root_id = null;
|
||||||
|
|
||||||
|
|
|
@ -485,7 +485,7 @@
|
||||||
|
|
||||||
if (get_schema_version() < 63) $profile_qpart = "";
|
if (get_schema_version() < 63) $profile_qpart = "";
|
||||||
|
|
||||||
$pdo = DB::pdo();
|
$pdo = Db::pdo();
|
||||||
$in_nested_tr = false;
|
$in_nested_tr = false;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -573,7 +573,7 @@
|
||||||
$_SESSION["uid"] = $user_id;
|
$_SESSION["uid"] = $user_id;
|
||||||
$_SESSION["auth_module"] = $auth_module;
|
$_SESSION["auth_module"] = $auth_module;
|
||||||
|
|
||||||
$pdo = DB::pdo();
|
$pdo = Db::pdo();
|
||||||
$sth = $pdo->prepare("SELECT login,access_level,pwd_hash FROM ttrss_users
|
$sth = $pdo->prepare("SELECT login,access_level,pwd_hash FROM ttrss_users
|
||||||
WHERE id = ?");
|
WHERE id = ?");
|
||||||
$sth->execute([$user_id]);
|
$sth->execute([$user_id]);
|
||||||
|
@ -662,7 +662,7 @@
|
||||||
|
|
||||||
function initialize_user($uid) {
|
function initialize_user($uid) {
|
||||||
|
|
||||||
$pdo = DB::pdo();
|
$pdo = Db::pdo();
|
||||||
|
|
||||||
$sth = $pdo->prepare("insert into ttrss_feeds (owner_uid,title,feed_url)
|
$sth = $pdo->prepare("insert into ttrss_feeds (owner_uid,title,feed_url)
|
||||||
values (?, 'Tiny Tiny RSS: Forum',
|
values (?, 'Tiny Tiny RSS: Forum',
|
||||||
|
@ -861,7 +861,7 @@
|
||||||
function get_schema_version($nocache = false) {
|
function get_schema_version($nocache = false) {
|
||||||
global $schema_version;
|
global $schema_version;
|
||||||
|
|
||||||
$pdo = DB::pdo();
|
$pdo = Db::pdo();
|
||||||
|
|
||||||
if (!$schema_version && !$nocache) {
|
if (!$schema_version && !$nocache) {
|
||||||
$row = $pdo->query("SELECT schema_version FROM ttrss_version")->fetch();
|
$row = $pdo->query("SELECT schema_version FROM ttrss_version")->fetch();
|
||||||
|
|
|
@ -105,7 +105,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SINGLE_USER_MODE && class_exists("PDO")) {
|
if (SINGLE_USER_MODE && class_exists("PDO")) {
|
||||||
$pdo = DB::pdo();
|
$pdo = Db::pdo();
|
||||||
|
|
||||||
$res = $pdo->query("SELECT id FROM ttrss_users WHERE id = 1");
|
$res = $pdo->query("SELECT id FROM ttrss_users WHERE id = 1");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue