1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 18:35:57 +00:00

rpc: switch to PDO

This commit is contained in:
Andrew Dolgov
2017-12-01 23:49:14 +03:00
parent 9652fa6b66
commit fbe7cb0a48
3 changed files with 213 additions and 289 deletions

View File

@@ -592,8 +592,13 @@
if (get_schema_version() < 63) $profile_qpart = "";
$pdo = DB::pdo();
$in_nested_tr = false;
$pdo->beginTransaction();
try {
$pdo->beginTransaction();
} catch (Exception $e) {
$in_nested_tr = true;
}
$sth = $pdo->query("SELECT pref_name,def_value FROM ttrss_prefs");
@@ -630,7 +635,7 @@
}
}
$pdo->commit();
if (!$in_nested_tr) $pdo->commit();
}