Commit aaaceadf authored by Sebastian Reichel's avatar Sebastian Reichel

Imported Upstream version 1.9+dfsg

parent 7e2f4fbd
......@@ -2,13 +2,13 @@
*~
*.DS_Store
#*
lib/floIcon.php
.idea/*
config.php
feed-icons/*
cache/*/*
lock/*
tags
plugins/fever
cache/htmlpurifier/*/*ser
lib/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer/*/*ser
web.config
......@@ -6,10 +6,23 @@ any location, while feeling as close to a real desktop application as possible.
http://tt-rss.org
Licensed under GNU GPL version 2
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright (c) 2005 Andrew Dolgov (unless explicitly stated otherwise).
Uses Silk icons by Mark James: http://www.famfamfam.com/lab/icons/silk/
## Requirements
* Compatible web browser (http://tt-rss.org/wiki/CompatibleBrowsers)
......
......@@ -203,7 +203,7 @@ class API extends Handler {
$override_order = false;
switch ($_REQUEST["order_by"]) {
case "date_reverse":
$override_order = "date_entered, updated";
$override_order = "score DESC, date_entered, updated";
break;
case "feed_dates":
$override_order = "updated DESC";
......@@ -309,7 +309,7 @@ class API extends Handler {
if ($article_id) {
$query = "SELECT id,title,link,content,cached_content,feed_id,comments,int_id,
$query = "SELECT id,title,link,content,feed_id,comments,int_id,
marked,unread,published,score,
".SUBSTRING_FOR_DATE."(updated,1,16) as updated,
author,(SELECT title FROM ttrss_feeds WHERE id = feed_id) AS feed_title
......@@ -338,7 +338,7 @@ class API extends Handler {
"comments" => $line["comments"],
"author" => $line["author"],
"updated" => (int) strtotime($line["updated"]),
"content" => $line["cached_content"] != "" ? $line["cached_content"] : $line["content"],
"content" => $line["content"],
"feed_id" => $line["feed_id"],
"attachments" => $attachments,
"score" => (int)$line["score"],
......@@ -638,6 +638,11 @@ class API extends Handler {
$headlines = array();
while ($line = db_fetch_assoc($result)) {
$line["content_preview"] = truncate_string(strip_tags($line["content_preview"]), 100);
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) {
$line = $p->hook_query_headlines($line, 100, true);
}
$is_updated = ($line["last_read"] == "" &&
($line["unread"] != "t" && $line["unread"] != "1"));
......@@ -660,28 +665,22 @@ class API extends Handler {
"tags" => $tags,
);
if ($include_attachments)
$headline_row['attachments'] = get_article_enclosures(
$line['id']);
if ($include_attachments)
$headline_row['attachments'] = get_article_enclosures(
$line['id']);
if ($show_excerpt) {
$excerpt = truncate_string(strip_tags($line["content_preview"]), 100);
$headline_row["excerpt"] = $excerpt;
}
if (!$show_excerpt)
$headline_row["excerpt"] = $line["content_preview"];
if ($show_content) {
if ($line["cached_content"] != "") {
$line["content_preview"] =& $line["cached_content"];
}
if ($sanitize_content) {
$headline_row["content"] = sanitize(
$line["content_preview"],
$line["content"],
sql_bool_to_bool($line['hide_images']),
false, $line["site_url"]);
} else {
$headline_row["content"] = $line["content_preview"];
$headline_row["content"] = $line["content"];
}
}
......@@ -699,6 +698,7 @@ class API extends Handler {
$headline_row["always_display_attachments"] = sql_bool_to_bool($line["always_display_enclosures"]);
$headline_row["author"] = $line["author"];
$headline_row["score"] = (int)$line["score"];
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_RENDER_ARTICLE_API) as $p) {
......
<?php
class FeedItem_Atom extends FeedItem_Common {
function get_id() {
$id = $this->elem->getElementsByTagName("id")->item(0);
......@@ -30,6 +31,7 @@ class FeedItem_Atom extends FeedItem_Common {
}
}
function get_link() {
$links = $this->elem->getElementsByTagName("link");
......@@ -38,8 +40,9 @@ class FeedItem_Atom extends FeedItem_Common {
(!$link->hasAttribute("rel")
|| $link->getAttribute("rel") == "alternate"
|| $link->getAttribute("rel") == "standout")) {
$base = $this->xpath->evaluate("string(ancestor-or-self::*[@xml:base][1]/@xml:base)", $link);
return $link->getAttribute("href");
return rewrite_relative_url($base, $link->getAttribute("href"));
}
}
}
......@@ -58,7 +61,13 @@ class FeedItem_Atom extends FeedItem_Common {
if ($content) {
if ($content->hasAttribute('type')) {
if ($content->getAttribute('type') == 'xhtml') {
return $this->doc->saveXML($content->firstChild->nextSibling);
for ($i = 0; $i < $content->childNodes->length; $i++) {
$child = $content->childNodes->item($i);
if ($child->hasChildNodes()) {
return $this->doc->saveXML($child);
}
}
}
}
......@@ -72,7 +81,13 @@ class FeedItem_Atom extends FeedItem_Common {
if ($content) {
if ($content->hasAttribute('type')) {
if ($content->getAttribute('type') == 'xhtml') {
return $this->doc->saveXML($content->firstChild->nextSibling);
for ($i = 0; $i < $content->childNodes->length; $i++) {
$child = $content->childNodes->item($i);
if ($child->hasChildNodes()) {
return $this->doc->saveXML($child);
}
}
}
}
......
......@@ -8,6 +8,17 @@ abstract class FeedItem_Common extends FeedItem {
$this->elem = $elem;
$this->xpath = $xpath;
$this->doc = $doc;
try {
$source = $elem->getElementsByTagName("source")->item(0);
// we don't need <source> element
if ($source)
$elem->removeChild($source);
} catch (DOMException $e) {
//
}
}
function get_author() {
......
......@@ -20,6 +20,24 @@ class FeedParser {
$error = libxml_get_last_error();
// libxml compiled without iconv?
if ($error && $error->code == 32) {
if (preg_match('/^(<\?xml[\t\n\r ].*?encoding=["\'])(.+?)(["\'].*?\?>)/s', $data, $matches) === 1) {
libxml_clear_errors();
$enc = $matches[2];
$data = iconv($enc, 'UTF-8//IGNORE', $data);
$data = preg_replace('/^<\?xml[\t\n\r ].*?\?>/s', $matches[1] . "UTF-8" . $matches[3] , $data);
$this->doc = new DOMDocument();
$this->doc->loadXML($data);
$error = libxml_get_last_error();
}
}
// some terrible invalid unicode entity?
if ($error && $error->code == 9) {
libxml_clear_errors();
......@@ -51,24 +69,28 @@ class FeedParser {
$this->xpath = $xpath;
$root = $xpath->query("(//atom03:feed|//atom:feed|//channel|//rdf:rdf|//rdf:RDF)")->item(0);
$root = $xpath->query("(//atom03:feed|//atom:feed|//channel|//rdf:rdf|//rdf:RDF)");
if ($root) {
switch (mb_strtolower($root->tagName)) {
case "rdf:rdf":
$this->type = $this::FEED_RDF;
break;
case "channel":
$this->type = $this::FEED_RSS;
break;
case "feed":
$this->type = $this::FEED_ATOM;
break;
default:
if( !isset($this->error) ){
$this->error = "Unknown/unsupported feed type";
$root = $root->item(0);
if ($root) {
switch (mb_strtolower($root->tagName)) {
case "rdf:rdf":
$this->type = $this::FEED_RDF;
break;
case "channel":
$this->type = $this::FEED_RSS;
break;
case "feed":
$this->type = $this::FEED_ATOM;
break;
default:
if( !isset($this->error) ){
$this->error = "Unknown/unsupported feed type";
}
return;
}
return;
}
switch ($this->type) {
......
......@@ -48,9 +48,11 @@ class Feeds extends Handler_Protected {
// right part
$error_class = $error ? "error" : "";
$reply .= "<span class='r'>";
$reply .= "<span id='selected_prompt'></span>";
$reply .= "<span id='feed_title'>";
$reply .= "<span id='feed_title' class='$error_class'>";
if ($feed_site_url) {
$last_updated = T_sprintf("Last updated: %s",
......@@ -61,7 +63,8 @@ class Feeds extends Handler_Protected {
truncate_string($feed_title,30)."</a>";
if ($error) {
$reply .= " (<span class=\"error\" title=\"$error\">Error</span>)";
$error = htmlspecialchars($error);
$reply .= "&nbsp;<img title=\"$error\" src='images/error.png' alt='error' class=\"noborder\" style=\"vertical-align : middle\">";
}
} else {
......@@ -74,7 +77,7 @@ class Feeds extends Handler_Protected {
<a href=\"#\"
title=\"".__("View as RSS feed")."\"
onclick=\"displayDlg('".__("View as RSS")."','generatedFeed', '$feed_id:$is_cat:$rss_link')\">
<img class=\"noborder\" style=\"vertical-align : middle\" src=\"images/pub_set.svg\"></a>";
<img class=\"noborder\" style=\"vertical-align : middle\" src=\"images/pub_set.png\"></a>";
$reply .= "</span>";
......@@ -288,6 +291,16 @@ class Feeds extends Handler_Protected {
$expand_cdm = get_pref('CDM_EXPANDED');
while ($line = $this->dbh->fetch_assoc($result)) {
$line["content_preview"] = "&mdash; " . truncate_string(strip_tags($line["content_preview"]), 250);
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) {
$line = $p->hook_query_headlines($line, 250, false);
}
if (get_pref('SHOW_CONTENT_PREVIEW')) {
$content_preview = $line["content_preview"];
}
$id = $line["id"];
$feed_id = $line["feed_id"];
$label_cache = $line["label_cache"];
......@@ -306,7 +319,7 @@ class Feeds extends Handler_Protected {
if (!is_array($labels)) $labels = get_article_labels($id);
$labels_str = "<span id=\"HLLCTR-$id\">";
$labels_str = "<span class=\"HLLCTR-$id\">";
$labels_str .= format_article_labels($labels, $id);
$labels_str .= "</span>";
......@@ -323,24 +336,24 @@ class Feeds extends Handler_Protected {
if (sql_bool_to_bool($line["marked"])) {
$marked_pic = "<img
src=\"images/mark_set.svg\"
src=\"images/mark_set.png\"
class=\"markedPic\" alt=\"Unstar article\"
onclick='toggleMark($id)'>";
$class .= " marked";
} else {
$marked_pic = "<img
src=\"images/mark_unset.svg\"
src=\"images/mark_unset.png\"
class=\"markedPic\" alt=\"Star article\"
onclick='toggleMark($id)'>";
}
if (sql_bool_to_bool($line["published"])) {
$published_pic = "<img src=\"images/pub_set.svg\"
$published_pic = "<img src=\"images/pub_set.png\"
class=\"pubPic\"
alt=\"Unpublish article\" onclick='togglePub($id)'>";
$class .= " published";
} else {
$published_pic = "<img src=\"images/pub_unset.svg\"
$published_pic = "<img src=\"images/pub_unset.png\"
class=\"pubPic\"
alt=\"Publish article\" onclick='togglePub($id)'>";
}
......@@ -360,11 +373,6 @@ class Feeds extends Handler_Protected {
$date_entered_fmt = T_sprintf("Imported at %s",
make_local_datetime($line["date_entered"], false));
if (get_pref('SHOW_CONTENT_PREVIEW')) {
$content_preview = truncate_string(strip_tags($line["content_preview"]),
250);
}
$score = $line["score"];
$score_pic = "images/" . get_score_pic($score);
......@@ -377,9 +385,9 @@ class Feeds extends Handler_Protected {
title=\"$score\">";
if ($score > 500) {
$hlc_suffix = "H";
$hlc_suffix = "high";
} else if ($score < -100) {
$hlc_suffix = "L";
$hlc_suffix = "low";
} else {
$hlc_suffix = "";
}
......@@ -395,7 +403,7 @@ class Feeds extends Handler_Protected {
if ($has_feed_icon) {
$feed_icon_img = "<img class=\"tinyFeedIcon\" src=\"".ICONS_URL."/$feed_id.ico\" alt=\"\">";
} else {
$feed_icon_img = "<img class=\"tinyFeedIcon\" src=\"images/pub_set.svg\" alt=\"\">";
$feed_icon_img = "<img class=\"tinyFeedIcon\" src=\"images/pub_set.png\" alt=\"\">";
}
$entry_site_url = $line["site_url"];
......@@ -448,16 +456,14 @@ class Feeds extends Handler_Protected {
$reply['content'] .= "</div>";
$reply['content'] .= "<div onclick='return hlClicked(event, $id)'
class=\"hlTitle\"><span class='hlContent$hlc_suffix'>";
$reply['content'] .= "<a id=\"RTITLE-$id\" class=\"title\"
class=\"hlTitle\"><span class='hlContent $hlc_suffix'>";
$reply['content'] .= "<a id=\"RTITLE-$id\" class=\"title $hlc_suffix\"
href=\"" . htmlspecialchars($line["link"]) . "\"
onclick=\"\">" .
truncate_string($line["title"], 200);
if (get_pref('SHOW_CONTENT_PREVIEW')) {
if ($content_preview) {
$reply['content'] .= "<span class=\"contentPreview\"> - $content_preview</span>";
}
$reply['content'] .= "<span class=\"contentPreview\">" . $line["content_preview"] . "</span>";
}
$reply['content'] .= "</a></span>";
......@@ -502,7 +508,7 @@ class Feeds extends Handler_Protected {
else
$tags = false;
$line["content"] = sanitize($line["content_preview"],
$line["content"] = sanitize($line["content"],
sql_bool_to_bool($line['hide_images']), false, $entry_site_url);
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_RENDER_ARTICLE_CDM) as $p) {
......@@ -539,7 +545,7 @@ class Feeds extends Handler_Protected {
$expanded_class = $expand_cdm ? "expanded" : "expandable";
$reply['content'] .= "<div class=\"cdm $expanded_class $class\"
$reply['content'] .= "<div class=\"cdm $hlc_suffix $expanded_class $class\"
id=\"RROW-$id\" $mouseover_attrs>";
$reply['content'] .= "<div class=\"cdmHeader\" style=\"$row_background\">";
......@@ -556,8 +562,8 @@ class Feeds extends Handler_Protected {
$reply['content'] .= "<span id=\"RTITLE-$id\"
onclick=\"return cdmClicked(event, $id);\"
class=\"titleWrap$hlc_suffix\">
<a class=\"title\"
class=\"titleWrap $hlc_suffix\">
<a class=\"title $hlc_suffix\"
target=\"_blank\" href=\"".
htmlspecialchars($line["link"])."\">".
$line["title"] .
......@@ -574,8 +580,8 @@ class Feeds extends Handler_Protected {
else
$excerpt_hidden = "style=\"display : none\"";
$reply['content'] .= "<span $excerpt_hidden
id=\"CEXC-$id\" class=\"cdmExcerpt\"> - $content_preview</span>";
$reply['content'] .= "<span $excerpt_hidden id=\"CEXC-$id\" class=\"cdmExcerpt\">" . $content_preview . "</span>";
$reply['content'] .= "</span>";
if (!get_pref('VFEED_GROUP_BY_FEED')) {
......@@ -638,7 +644,7 @@ class Feeds extends Handler_Protected {
$reply['content'] .= "&nbsp;";
$reply['content'] .= "<a target='_blank' href='" . htmlspecialchars($tmp_line['feed_url']) . "'>";
$reply['content'] .= "<img title='".__('Feed URL')."'class='tinyFeedIcon' src='images/pub_unset.svg'></a>";
$reply['content'] .= "<img title='".__('Feed URL')."'class='tinyFeedIcon' src='images/pub_unset.png'></a>";
$reply['content'] .= "</div>";
}
......@@ -863,7 +869,7 @@ class Feeds extends Handler_Protected {
$override_order = "ttrss_entries.title";
break;
case "date_reverse":
$override_order = "date_entered, updated";
$override_order = "score DESC, date_entered, updated";
break;
case "feed_dates":
$override_order = "updated DESC";
......
......@@ -3,7 +3,7 @@ class Handler_Public extends Handler {
private function generate_syndicated_feed($owner_uid, $feed, $is_cat,
$limit, $offset, $search, $search_mode,
$view_mode = false, $format = 'atom', $order = false) {
$view_mode = false, $format = 'atom', $order = false, $orig_guid = false) {
require_once "lib/MiniTemplator.class.php";
......@@ -65,8 +65,8 @@ class Handler_Public extends Handler {
$last_error = $qfh_ret[3];
$feed_self_url = get_self_url_prefix() .
"/public.php?op=rss&id=-2&key=" .
get_feed_access_key(-2, false, $owner_uid);
"/public.php?op=rss&id=$feed&key=" .
get_feed_access_key($feed, false, $owner_uid);
if (!$feed_site_url) $feed_site_url = get_self_url_prefix();
......@@ -85,16 +85,21 @@ class Handler_Public extends Handler {
}
$tpl->setVariable('SELF_URL', htmlspecialchars(get_self_url_prefix()), true);
$line["content_preview"] = truncate_string(strip_tags($line["content_preview"]), 100, '...');
while ($line = $this->dbh->fetch_assoc($result)) {
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) {
$line = $p->hook_query_headlines($line);
}
$tpl->setVariable('ARTICLE_ID', htmlspecialchars($line['link']), true);
$tpl->setVariable('ARTICLE_ID',
htmlspecialchars($orig_guid ? $line['link'] :
get_self_url_prefix() .
"/public.php?url=" . urlencode($line['link'])), true);
$tpl->setVariable('ARTICLE_LINK', htmlspecialchars($line['link']), true);
$tpl->setVariable('ARTICLE_TITLE', htmlspecialchars($line['title']), true);
$tpl->setVariable('ARTICLE_EXCERPT',
truncate_string(strip_tags($line["content_preview"]), 100, '...'), true);
$tpl->setVariable('ARTICLE_EXCERPT', $line["content_preview"], true);
$content = sanitize($line["content_preview"], false, $owner_uid);
$content = sanitize($line["content"], false, $owner_uid);
if ($line['note']) {
$content = "<div style=\"$note_style\">Article note: " . $line['note'] . "</div>" .
......@@ -111,6 +116,9 @@ class Handler_Public extends Handler {
$tpl->setVariable('ARTICLE_AUTHOR', htmlspecialchars($line['author']), true);
$tpl->setVariable('ARTICLE_SOURCE_LINK', htmlspecialchars($line['site_url']), true);
$tpl->setVariable('ARTICLE_SOURCE_TITLE', htmlspecialchars($line['feed_title']), true);
$tags = get_article_tags($line["id"], $owner_uid);
foreach ($tags as $tag) {
......@@ -164,13 +172,17 @@ class Handler_Public extends Handler {
$feed['articles'] = array();
while ($line = $this->dbh->fetch_assoc($result)) {
$line["content_preview"] = truncate_string(strip_tags($line["content_preview"]), 100, '...');
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) {
$line = $p->hook_query_headlines($line, 100);
}
$article = array();
$article['id'] = $line['link'];
$article['link'] = $line['link'];
$article['title'] = $line['title'];
$article['excerpt'] = truncate_string(strip_tags($line["content_preview"]), 100, '...');
$article['content'] = sanitize($line["content_preview"], false, $owner_uid);
$article['excerpt'] = $line["content_preview"];
$article['content'] = sanitize($line["content"], false, $owner_uid);
$article['updated'] = date('c', strtotime($line["updated"]));
if ($line['note']) $article['note'] = $line['note'];
......@@ -237,7 +249,7 @@ class Handler_Public extends Handler {
function getProfiles() {
$login = $this->dbh->escape_string($_REQUEST["login"]);
$result = $this->dbh->query("SELECT * FROM ttrss_settings_profiles,ttrss_users
$result = $this->dbh->query("SELECT ttrss_settings_profiles.* FROM ttrss_settings_profiles,ttrss_users
WHERE ttrss_users.id = ttrss_settings_profiles.owner_uid AND login = '$login' ORDER BY title");
print "<select dojoType='dijit.form.Select' style='width : 220px; margin : 0px' name='profile'>";
......@@ -342,7 +354,7 @@ class Handler_Public extends Handler {
function rss() {
$feed = $this->dbh->escape_string($_REQUEST["id"]);
$key = $this->dbh->escape_string($_REQUEST["key"]);
$is_cat = $_REQUEST["is_cat"] != false;
$is_cat = sql_bool_to_bool($_REQUEST["is_cat"]);
$limit = (int)$this->dbh->escape_string($_REQUEST["limit"]);
$offset = (int)$this->dbh->escape_string($_REQUEST["offset"]);
......@@ -352,6 +364,7 @@ class Handler_Public extends Handler {
$order = $this->dbh->escape_string($_REQUEST["order"]);
$format = $this->dbh->escape_string($_REQUEST['format']);
$orig_guid = !sql_bool_to_bool($_REQUEST["no_orig_guid"]);
if (!$format) $format = 'atom';
......@@ -371,7 +384,7 @@ class Handler_Public extends Handler {
if ($owner_id) {
$this->generate_syndicated_feed($owner_id, $feed, $is_cat, $limit,
$offset, $search, $search_mode, $view_mode, $format, $order);
$offset, $search, $search_mode, $view_mode, $format, $order, $orig_guid);
} else {
header('HTTP/1.1 403 Forbidden');
}
......@@ -543,6 +556,7 @@ class Handler_Public extends Handler {
}
} else {
$_SESSION["login_error_msg"] = __("Incorrect username or password");
user_error("Failed login attempt from {$_SERVER['REMOTE_ADDR']}", E_USER_WARNING);
}
if ($_REQUEST['return']) {
......
......@@ -190,6 +190,7 @@ class Opml extends Handler_Protected {
}
$tmp_line["cat_filter"] = sql_bool_to_bool($tmp_line["cat_filter"]);
$tmp_line["inverse"] = sql_bool_to_bool($tmp_line["inverse"]);
unset($tmp_line["feed_id"]);
unset($tmp_line["cat_id"]);
......@@ -363,9 +364,10 @@ class Opml extends Handler_Protected {
$cat_filter = bool_to_sql_bool($rule["cat_filter"]);
$reg_exp = $this->dbh->escape_string($rule["reg_exp"]);
$filter_type = (int)$rule["filter_type"];
$inverse = bool_to_sql_bool($rule["inverse"]);
$this->dbh->query("INSERT INTO ttrss_filters2_rules (feed_id,cat_id,filter_id,filter_type,reg_exp,cat_filter)
VALUES ($feed_id, $cat_id, $filter_id, $filter_type, '$reg_exp', $cat_filter)");
$this->dbh->query("INSERT INTO ttrss_filters2_rules (feed_id,cat_id,filter_id,filter_type,reg_exp,cat_filter,inverse)
VALUES ($feed_id, $cat_id, $filter_id, $filter_type, '$reg_exp', $cat_filter,$inverse)");
}
foreach ($filter["actions"] as $action) {
......
......@@ -37,6 +37,7 @@ class PluginHost {
const HOOK_PREFS_EDIT_FEED = 20;
const HOOK_PREFS_SAVE_FEED = 21;
const HOOK_FETCH_FEED = 22;
const HOOK_QUERY_HEADLINES = 23;
const KIND_ALL = 1;
const KIND_SYSTEM = 2;
......
......@@ -572,8 +572,9 @@ class Pref_Feeds extends Handler_Protected {
$last_error = $this->dbh->fetch_result($result, 0, "last_error");
if ($last_error) {
print "&nbsp;<span title=\"".htmlspecialchars($last_error)."\"
class=\"feed_error\">(error)</span>";
print "&nbsp;<img src=\"images/error.png\" alt=\"(error)\"
style=\"vertical-align : middle\"
title=\"".htmlspecialchars($last_error)."\">";
}
......@@ -792,31 +793,10 @@ class Pref_Feeds extends Handler_Protected {
print "<div class=\"dlgSec\">".__("Feed")."</div>";
print "<div class=\"dlgSecCont\">";
/* Title */
print "<input dojoType=\"dijit.form.ValidationTextBox\"
disabled=\"1\" style=\"font-size : 16px; width : 20em;\" required=\"1\"
name=\"title\" value=\"\">";
$this->batch_edit_cbox("title");
/* Feed URL */
print "<br/>";
print __('URL:') . " ";
print "<input dojoType=\"dijit.form.ValidationTextBox\" disabled=\"1\"
required=\"1\" regExp='^(http|https)://.*' style=\"width : 20em\"
name=\"feed_url\" value=\"\">";
$this->batch_edit_cbox("feed_url");
/* Category */
if (get_pref('ENABLE_FEED_CATS')) {
print "<br/>";
print __('Place in category:') . " ";
print_feed_cat_select("cat_id", false,
......@@ -862,7 +842,7 @@ class Pref_Feeds extends Handler_Protected {
$this->batch_edit_cbox("auth_login");
print "<br/><input dojoType=\"dijit.form.TextBox\" type=\"password\" name=\"auth_pass\"
print "<hr/> <input dojoType=\"dijit.form.TextBox\" type=\"password\" name=\"auth_pass\"
placeHolder=\"".__("Password")."\" disabled=\"1\"
value=\"\">";
......@@ -1492,15 +1472,6 @@ class Pref_Feeds extends Handler_Protected {
print "</p>";
print_warning(__("You can disable all articles shared by unique URLs here."));
print "<p>";
print "<button dojoType=\"dijit.form.Button\" onclick=\"return clearArticleAccessKeys()\">".
__('Unshare all articles')."</button> ";
print "</p>";
PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB_SECTION,
"hook_prefs_tab_section", "prefFeedsPublishedGenerated");
......
......@@ -97,12 +97,16 @@ class Pref_Filters extends Handler_Protected {
print "<table width=\"100%\" cellspacing=\"0\" id=\"prefErrorFeedList\">";
while ($line = $this->dbh->fetch_assoc($result)) {
$line["content_preview"] = truncate_string(strip_tags($line["content_preview"]), 100, '...');
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) {
$line = $p->hook_query_headlines($line, 100);
}
$entry_timestamp = strtotime($line["updated"]);
$entry_tags = get_article_tags($line["id"