]> git.wh0rd.org - tt-rss.git/blobdiff - classes/article.php
fix various issues reported by static analysis
[tt-rss.git] / classes / article.php
index e47da86173c5700bb7140baa3e1ba06fe7943ce3..2e7a05e0bb1db7e125242adcef0b9182e5895d52 100644 (file)
@@ -92,13 +92,18 @@ class Article extends Handler_Protected {
                if (!$content) {
                        $pluginhost = new PluginHost();
                        $pluginhost->load_all(PluginHost::KIND_ALL, $owner_uid);
+                       $pluginhost->load_data();
 
                        $af_readability = $pluginhost->get_plugin("Af_Readability");
 
                        if ($af_readability) {
-                               $extracted_content = $af_readability->extract_content($url);
+                               $enable_share_anything = $pluginhost->get($af_readability, "enable_share_anything");
 
-                               if ($extracted_content) $content = db_escape_string($extracted_content);
+                               if ($enable_share_anything) {
+                                       $extracted_content = $af_readability->extract_content($url);
+
+                                       if ($extracted_content) $content = db_escape_string($extracted_content);
+                               }
                        }
                }
 
@@ -197,14 +202,14 @@ class Article extends Handler_Protected {
 
                $tags_str = join(", ", $tags);
 
-               print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"id\" value=\"$param\">";
-               print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"article\">";
-               print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"setArticleTags\">";
+               print_hidden("id", "$param");
+               print_hidden("op", "article");
+               print_hidden("method", "setArticleTags");
 
                print "<table width='100%'><tr><td>";
 
                print "<textarea dojoType=\"dijit.form.SimpleTextarea\" rows='4'
-                       style='font-size : 12px; width : 98%' id=\"tags_str\"
+                       style='height : 100px; font-size : 12px; width : 98%' id=\"tags_str\"
                        name='tags_str'>$tags_str</textarea>
                <div class=\"autocomplete\" id=\"tags_choices\"
                                style=\"display:none\"></div>";
@@ -356,7 +361,7 @@ class Article extends Handler_Protected {
                                $labels = get_article_labels($id, $_SESSION["uid"]);
 
                                array_push($reply["info-for-headlines"],
-                               array("id" => $id, "labels" => format_article_labels($labels, $id)));
+                               array("id" => $id, "labels" => format_article_labels($labels)));
 
                        }
                }