]> git.wh0rd.org - tt-rss.git/blobdiff - modules/backend-rpc.php
dynamically show new label markers in headlines buffer w/o reload
[tt-rss.git] / modules / backend-rpc.php
index 918f8ca9084c6248c79b00eefc3bb43de2c12549..22a926412fb1b8559d809fc12653d227f54b6511 100644 (file)
 
                        $label = label_find_caption($link, $label_id, $_SESSION["uid"]);
 
+                       print "<rpc-reply>";                    
+
+                       print "<info-for-headlines>";
+
                        if ($label) {
 
                                foreach ($ids as $id) {
                                        label_add_article($link, $id, $label, $_SESSION["uid"]);
+
+                                       print "<entry id=\"$id\"><![CDATA[";
+
+                                       $labels = get_article_labels($link, $id, $_SESSION["uid"]);
+
+                                       foreach ($labels as $l) {
+                                               print  "<span class='hlLabelRef'>".$l[1]."</span>";
+                                       }
+
+                                       print "]]></entry>";
+
                                }
                        }
 
-                       print "<rpc-reply>OK</rpc-reply>";
+                       print "</info-for-headlines>";
+
+                       print "<counters>";
+                       getAllCounters($link, $omode);
+                       print "</counters>";
+                       print "</rpc-reply>";
 
                        return;
                }