]> git.wh0rd.org Git - tt-rss.git/commitdiff
rpc: move completeTags to article
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 2 Apr 2013 10:53:36 +0000 (14:53 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 2 Apr 2013 10:53:36 +0000 (14:53 +0400)
classes/article.php
classes/rpc.php
js/viewfeed.js

index bf1e5566208b3ffcfb73b43293fa21563a52edde..e75af0e7a457375cf0fef0e501d7f996dab695f1 100644 (file)
@@ -284,4 +284,21 @@ class Article extends Handler_Protected {
                                "content" => $tags_str, "content_full" => $tags_str_full));
        }
 
+
+       function completeTags() {
+               $search = db_escape_string($this->link, $_REQUEST["search"]);
+
+               $result = db_query($this->link, "SELECT DISTINCT tag_name FROM ttrss_tags
+                               WHERE owner_uid = '".$_SESSION["uid"]."' AND
+                               tag_name LIKE '$search%' ORDER BY tag_name
+                               LIMIT 10");
+
+               print "<ul>";
+               while ($line = db_fetch_assoc($result)) {
+                       print "<li>" . $line["tag_name"] . "</li>";
+               }
+               print "</ul>";
+       }
+
+
 }
index a78e079caf6934a057c3607c440e185f6bebb396..04b763c46db2ed8e6445c2591008a22c633f22a3 100644 (file)
@@ -363,22 +363,6 @@ class RPC extends Handler_Protected {
                print "</ul>";
        }
 
-
-       function completeTags() {
-               $search = db_escape_string($this->link, $_REQUEST["search"]);
-
-               $result = db_query($this->link, "SELECT DISTINCT tag_name FROM ttrss_tags
-                               WHERE owner_uid = '".$_SESSION["uid"]."' AND
-                               tag_name LIKE '$search%' ORDER BY tag_name
-                               LIMIT 10");
-
-               print "<ul>";
-               while ($line = db_fetch_assoc($result)) {
-                       print "<li>" . $line["tag_name"] . "</li>";
-               }
-               print "</ul>";
-       }
-
        function purge() {
                $ids = explode(",", db_escape_string($this->link, $_REQUEST["ids"]));
                $days = sprintf("%d", $_REQUEST["days"]);
index be2b88f4d80439436b7bdb31a76eb744ab75db65..31eff1b8a87e89c6d8b33dcd0ec20e3a7d6b61a1 100644 (file)
@@ -1114,7 +1114,7 @@ function editArticleTags(id) {
                dojo.disconnect(tmph);
 
                        new Ajax.Autocompleter('tags_str', 'tags_choices',
-                          "backend.php?op=rpc&method=completeTags",
+                          "backend.php?op=article&method=completeTags",
                           { tokens: ',', paramName: "search" });
                });