X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=classes%2Fdlg.php;h=9ac5cd12fef16f8a1bcec52a7ab24edec59aa239;hb=07fd4f8d9d4f301f5ad88ff9e80f042fc3eb0c36;hp=32a3b230afbbb7d6d48663bf42e7ec691001ce93;hpb=9d76e754513ec1119a010ab2e9abcf9fb9df52d1;p=tt-rss.git
diff --git a/classes/dlg.php b/classes/dlg.php
index 32a3b230..9ac5cd12 100644
--- a/classes/dlg.php
+++ b/classes/dlg.php
@@ -1,12 +1,13 @@
param = db_escape_string($this->link, $_REQUEST["param"]);
+ $this->param = $_REQUEST["param"];
return true;
}
return false;
@@ -16,18 +17,13 @@ class Dlg extends Handler_Protected {
print __("If you have imported labels and/or filters, you might need to reload preferences to see your new data.") . "
";
print "";
- $owner_uid = $_SESSION["uid"];
-
- db_query($this->link, "BEGIN");
print "
";
- $opml = new Opml($this->link, $_REQUEST);
+ $opml = new Opml($_REQUEST);
$opml->opml_import($_SESSION["uid"]);
- db_query($this->link, "COMMIT");
-
print "
";
print "
";
@@ -43,7 +39,7 @@ class Dlg extends Handler_Protected {
}
function pubOPMLUrl() {
- $url_path = Opml::opml_publish_url($this->link);
+ $url_path = Opml::opml_publish_url();
print __("Your Public OPML URL is:");
@@ -102,19 +98,18 @@ 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 = db_query($this->link, $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 = db_fetch_assoc($result)) {
+ while ($line = $sth->fetch()) {
$tags[$line["tag_name"]] = $line["count"];
}
- if( count($tags) == 0 ){ return; }
+ if(count($tags) == 0 ){ return; }
ksort($tags);
@@ -144,7 +139,7 @@ class Dlg extends Handler_Protected {
$key_escaped = str_replace("'", "\\'", $key);
- echo "' . $key . ' ';
}
@@ -161,44 +156,13 @@ class Dlg extends Handler_Protected {
}
- function printTagSelect() {
-
- print __("Match:"). " " .
- "";
- print "";
- print " ";
- print "";
- print "