summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-12-03 10:46:00 +0300
committerAndrew Dolgov <[email protected]>2017-12-03 10:46:00 +0300
commitd8a924d9307926f16d68c4e52862039ef5d34876 (patch)
tree290817040ab6a16a1b0cf8233ee5acf756e2a878 /plugins
parent0f4487d3d69d1ebf21a424d75863f3864c305883 (diff)
plugins/auto_assign_labels: use PDO
Diffstat (limited to 'plugins')
-rw-r--r--plugins/auto_assign_labels/init.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/auto_assign_labels/init.php b/plugins/auto_assign_labels/init.php
index 911adb6b8..cc70e2dff 100644
--- a/plugins/auto_assign_labels/init.php
+++ b/plugins/auto_assign_labels/init.php
@@ -1,6 +1,7 @@
<?php
class Auto_Assign_Labels extends Plugin {
+ /* @var PluginHost $host */
private $host;
function about() {
@@ -18,9 +19,10 @@ class Auto_Assign_Labels extends Plugin {
function get_all_labels_filter_format($owner_uid) {
$rv = array();
- $result = db_query("SELECT id, fg_color, bg_color, caption FROM ttrss_labels2 WHERE owner_uid = " . $owner_uid);
+ $sth = $this->pdo->prepare("SELECT id, fg_color, bg_color, caption FROM ttrss_labels2 WHERE owner_uid = ?");
+ $sth->execute([$owner_uid]);
- while ($line = db_fetch_assoc($result)) {
+ while ($line = $sth->fetch()) {
array_push($rv, array(Labels::label_to_feed_id($line["id"]),
$line["caption"], $line["fg_color"], $line["bg_color"]));
}