X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=classes%2Fdlg.php;h=9ac5cd12fef16f8a1bcec52a7ab24edec59aa239;hb=81fc862e370a1dfbd3941206fd00076e3cbf0551;hp=eee720ed40a25c271c706e26790d9a400b90d1dd;hpb=415a3b50c9879027d5367696ef2b21200cbd5827;p=tt-rss.git diff --git a/classes/dlg.php b/classes/dlg.php index eee720ed..9ac5cd12 100644 --- a/classes/dlg.php +++ b/classes/dlg.php @@ -7,7 +7,7 @@ class Dlg extends Handler_Protected { if (parent::before($method)) { header("Content-Type: text/html"); # required for iframe - $this->param = $this->dbh->escape_string($_REQUEST["param"]); + $this->param = $_REQUEST["param"]; return true; } return false; @@ -18,16 +18,12 @@ class Dlg extends Handler_Protected { print "
"; - $this->dbh->query("BEGIN"); - print ""; print "
"; @@ -102,15 +98,14 @@ class Dlg extends Handler_Protected { // from here: http://www.roscripts.com/Create_tag_cloud-71.html - $query = "SELECT tag_name, COUNT(post_int_id) AS count - FROM ttrss_tags WHERE owner_uid = ".$_SESSION["uid"]." - GROUP BY tag_name ORDER BY count DESC LIMIT 50"; - - $result = $this->dbh->query($query); + $sth = $this->pdo->prepare("SELECT tag_name, COUNT(post_int_id) AS count + FROM ttrss_tags WHERE owner_uid = ? + GROUP BY tag_name ORDER BY count DESC LIMIT 50"); + $sth->execute([$_SESSION['uid']]); $tags = array(); - while ($line = $this->dbh->fetch_assoc($result)) { + while ($line = $sth->fetch()) { $tags[$line["tag_name"]] = $line["count"]; } @@ -144,7 +139,7 @@ class Dlg extends Handler_Protected { $key_escaped = str_replace("'", "\\'", $key); - echo "' . $key . ' '; } @@ -161,41 +156,10 @@ class Dlg extends Handler_Protected { } - function printTagSelect() { - - print __("Match:"). " " . - ""; - print ""; - print " "; - print ""; - print "