plugins/af_readability: use PDO
This commit is contained in:
parent
ef2438a503
commit
0f4487d3d6
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
class Af_Readability extends Plugin {
|
class Af_Readability extends Plugin {
|
||||||
|
|
||||||
|
/* @var PluginHost $host */
|
||||||
private $host;
|
private $host;
|
||||||
|
|
||||||
function about() {
|
function about() {
|
||||||
|
@ -235,9 +236,10 @@ class Af_Readability extends Plugin {
|
||||||
|
|
||||||
foreach ($enabled_feeds as $feed) {
|
foreach ($enabled_feeds as $feed) {
|
||||||
|
|
||||||
$result = db_query("SELECT id FROM ttrss_feeds WHERE id = '$feed' AND owner_uid = " . $_SESSION["uid"]);
|
$sth = $this->pdo->prepare("SELECT id FROM ttrss_feeds WHERE id = ? AND owner_uid = ?");
|
||||||
|
$sth->execute([$feed, $_SESSION['uid']]);
|
||||||
|
|
||||||
if (db_num_rows($result) != 0) {
|
if ($row = $sth->fetch()) {
|
||||||
array_push($tmp, $feed);
|
array_push($tmp, $feed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue