X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=classes%2Fdlg.php;h=9ac5cd12fef16f8a1bcec52a7ab24edec59aa239;hb=50052fb78a3a9d1bb3fa488e7fd7b23125c38124;hp=e3931bc3ae7c3eaee00f8ac30b0e050f353105e5;hpb=d9c042c4c536f1afbf206aeea09b0b127b7b6418;p=tt-rss.git diff --git a/classes/dlg.php b/classes/dlg.php index e3931bc3..9ac5cd12 100644 --- a/classes/dlg.php +++ b/classes/dlg.php @@ -1,12 +1,13 @@ param = $this->dbh->escape_string($_REQUEST["param"]); + $this->param = $_REQUEST["param"]; return true; } return false; @@ -17,16 +18,12 @@ class Dlg extends Handler_Protected { print "
"; - $this->dbh->query("BEGIN"); - print ""; print "
"; @@ -101,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"]; } @@ -143,7 +139,7 @@ class Dlg extends Handler_Protected { $key_escaped = str_replace("'", "\\'", $key); - echo "' . $key . ' '; } @@ -160,41 +156,10 @@ class Dlg extends Handler_Protected { } - function printTagSelect() { - - print __("Match:"). " " . - ""; - print ""; - print " "; - print ""; - print "