From 2e35a7070b17a7bbc01730071391382f9cbe09ea Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 1 Apr 2013 21:08:32 +0400 Subject: generated feeds: support if-modified-since --- classes/handler/public.php | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/handler/public.php b/classes/handler/public.php index 37c704584..151447540 100644 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -21,11 +21,32 @@ class Handler_Public extends Handler { else if ($feed == -1) $date_sort_field = "last_marked DESC"; + $qfh_ret = queryFeedHeadlines($this->link, $feed, + 1, $view_mode, $is_cat, $search, $search_mode, + $date_sort_field, $offset, $owner_uid, + false, 0, false, true); + + $result = $qfh_ret[0]; + + if (db_num_rows($result) != 0) { + $ts = strtotime(db_fetch_result($result, 0, "date_entered")); + + if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && + strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) >= $last_modified) { + header('HTTP/1.0 304 Not Modified'); + return; + } + + $last_modified = gmdate("D, d M Y H:i:s", $ts) . " GMT"; + header("Last-Modified: $last_modified", true); + } + $qfh_ret = queryFeedHeadlines($this->link, $feed, $limit, $view_mode, $is_cat, $search, $search_mode, $date_sort_field, $offset, $owner_uid, false, 0, false, true); + $result = $qfh_ret[0]; $feed_title = htmlspecialchars($qfh_ret[1]); $feed_site_url = $qfh_ret[2]; @@ -53,7 +74,8 @@ class Handler_Public extends Handler { $tpl->setVariable('SELF_URL', htmlspecialchars(get_self_url_prefix()), true); - while ($line = db_fetch_assoc($result)) { + while ($line = db_fetch_assoc($result)) { + $tpl->setVariable('ARTICLE_ID', htmlspecialchars($line['link']), true); $tpl->setVariable('ARTICLE_LINK', htmlspecialchars($line['link']), true); $tpl->setVariable('ARTICLE_TITLE', htmlspecialchars($line['title']), true); -- cgit v1.2.3-54-g00ecf From d6ba77f3ad6183f0acce75790172fb22f2100367 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 1 Apr 2013 21:13:13 +0400 Subject: fix 304 being returned all the time --- classes/handler/public.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/handler/public.php b/classes/handler/public.php index 151447540..f6a5786a5 100644 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -32,7 +32,7 @@ class Handler_Public extends Handler { $ts = strtotime(db_fetch_result($result, 0, "date_entered")); if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && - strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) >= $last_modified) { + strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) >= $ts) { header('HTTP/1.0 304 Not Modified'); return; } -- cgit v1.2.3-54-g00ecf From 2faef8349cf674605f9e2b1e8227c0af1b0d0609 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 1 Apr 2013 21:15:50 +0400 Subject: generated feeds: lower default query limit --- classes/handler/public.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/handler/public.php b/classes/handler/public.php index f6a5786a5..b8a32cd27 100644 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -12,7 +12,7 @@ class Handler_Public extends Handler { "padding : 5px; border-style : dashed; border-color : #e7d796;". "margin-bottom : 1em; color : #9a8c59;"; - if (!$limit) $limit = 100; + if (!$limit) $limit = 60; $date_sort_field = "date_entered DESC, updated DESC"; -- cgit v1.2.3-54-g00ecf From 0bbd14146a7332e086cd82595af718fa55e03803 Mon Sep 17 00:00:00 2001 From: j0nson Date: Mon, 1 Apr 2013 22:21:36 -0300 Subject: adds sort order to API Allows sort by feed date or by reverse order api Params: order_by (string = feed_dates, date_reverse) --- classes/api.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/api.php b/classes/api.php index ea57a61ab..f0f943698 100644 --- a/classes/api.php +++ b/classes/api.php @@ -198,14 +198,22 @@ class API extends Handler { $since_id = (int)db_escape_string($this->link, $_REQUEST["since_id"]); $include_nested = sql_bool_to_bool($_REQUEST["include_nested"]); $sanitize_content = true; - + $override_order = false; + switch ($_REQUEST["order_by"]) { + case "date_reverse": + $override_order = "date_entered, updated"; + break; + case "feed_dates": + $override_order = "updated DESC"; + break; + } /* do not rely on params below */ $search = db_escape_string($this->link, $_REQUEST["search"]); $search_mode = db_escape_string($this->link, $_REQUEST["search_mode"]); $headlines = $this->api_get_headlines($this->link, $feed_id, $limit, $offset, - $filter, $is_cat, $show_excerpt, $show_content, $view_mode, false, + $filter, $is_cat, $show_excerpt, $show_content, $view_mode, $override_order, $include_attachments, $since_id, $search, $search_mode, $include_nested, $sanitize_content); -- cgit v1.2.3-54-g00ecf From 0671359f2831609123e9ddf8541db71f255fa5dc Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 2 Apr 2013 08:55:35 +0400 Subject: make show empty cats menu item more visible, move unsubscribe to feeds dropdown --- classes/pref/feeds.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'classes') diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index 46c3d083b..eda03d126 100644 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -1279,6 +1279,8 @@ class Pref_Feeds extends Handler_Protected { dojoType=\"dijit.MenuItem\">".__('Reset sort order').""; print "
".__('Batch subscribe')."
"; + print "
" + .__('Unsubscribe')."
"; print ""; if (get_pref($this->link, 'ENABLE_FEED_CATS')) { @@ -1287,8 +1289,6 @@ class Pref_Feeds extends Handler_Protected { print "
"; print "
".__('Add category')."
"; - print "
".__('(Un)hide empty categories')."
"; print "
".__('Reset sort order')."
"; print "
" - .__('Unsubscribe')." "; + print ""; if (defined('_ENABLE_FEED_DEBUGGING')) { -- cgit v1.2.3-54-g00ecf From 129562e0b169897cb4b6781a4b62f907c4902775 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 2 Apr 2013 09:03:35 +0400 Subject: opml: add some data length limiting --- classes/opml.php | 14 +++++++------- include/functions.php | 2 ++ 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'classes') diff --git a/classes/opml.php b/classes/opml.php index 4c188de5e..7a49f757c 100644 --- a/classes/opml.php +++ b/classes/opml.php @@ -253,13 +253,13 @@ class Opml extends Handler_Protected { private function opml_import_feed($doc, $node, $cat_id, $owner_uid) { $attrs = $node->attributes; - $feed_title = db_escape_string($this->link, $attrs->getNamedItem('text')->nodeValue); - if (!$feed_title) $feed_title = db_escape_string($this->link, $attrs->getNamedItem('title')->nodeValue); + $feed_title = db_escape_string($this->link, mb_substr($attrs->getNamedItem('text')->nodeValue, 0, 250)); + if (!$feed_title) $feed_title = db_escape_string($this->link, mb_substr($attrs->getNamedItem('title')->nodeValue, 0, 250)); - $feed_url = db_escape_string($this->link, $attrs->getNamedItem('xmlUrl')->nodeValue); - if (!$feed_url) $feed_url = db_escape_string($this->link, $attrs->getNamedItem('xmlURL')->nodeValue); + $feed_url = db_escape_string($this->link, mb_substr($attrs->getNamedItem('xmlUrl')->nodeValue, 0, 250)); + if (!$feed_url) $feed_url = db_escape_string($this->link, mb_substr($attrs->getNamedItem('xmlURL')->nodeValue, 0, 250)); - $site_url = db_escape_string($this->link, $attrs->getNamedItem('htmlUrl')->nodeValue); + $site_url = db_escape_string($this->link, mb_substr($attrs->getNamedItem('htmlUrl')->nodeValue, 0, 250)); if ($feed_url && $feed_title) { $result = db_query($this->link, "SELECT id FROM ttrss_feeds WHERE @@ -386,10 +386,10 @@ class Opml extends Handler_Protected { $default_cat_id = (int) get_feed_category($this->link, 'Imported feeds', false); if ($root_node) { - $cat_title = db_escape_string($this->link, $root_node->attributes->getNamedItem('text')->nodeValue); + $cat_title = db_escape_string($this->link, mb_substr($root_node->attributes->getNamedItem('text')->nodeValue, 0, 250)); if (!$cat_title) - $cat_title = db_escape_string($this->link, $root_node->attributes->getNamedItem('title')->nodeValue); + $cat_title = db_escape_string($this->link, mb_substr($root_node->attributes->getNamedItem('title')->nodeValue, 0, 250)); if (!in_array($cat_title, array("tt-rss-filters", "tt-rss-labels", "tt-rss-prefs"))) { $cat_id = get_feed_category($this->link, $cat_title, $parent_id); diff --git a/include/functions.php b/include/functions.php index a559ed1da..d321dc2ed 100644 --- a/include/functions.php +++ b/include/functions.php @@ -3406,6 +3406,8 @@ $parent_insert = "NULL"; } + $feed_cat = mb_substr($feed_cat, 0, 250); + $result = db_query($link, "SELECT id FROM ttrss_feed_categories WHERE $parent_qpart AND title = '$feed_cat' AND owner_uid = ".$_SESSION["uid"]); -- cgit v1.2.3-54-g00ecf From ffd0786416271a00638c8becc2974d96221ec642 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 2 Apr 2013 09:34:32 +0400 Subject: api: add a few logical spaces --- classes/api.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'classes') diff --git a/classes/api.php b/classes/api.php index f0f943698..902cb0853 100644 --- a/classes/api.php +++ b/classes/api.php @@ -198,6 +198,7 @@ class API extends Handler { $since_id = (int)db_escape_string($this->link, $_REQUEST["since_id"]); $include_nested = sql_bool_to_bool($_REQUEST["include_nested"]); $sanitize_content = true; + $override_order = false; switch ($_REQUEST["order_by"]) { case "date_reverse": @@ -207,6 +208,7 @@ class API extends Handler { $override_order = "updated DESC"; break; } + /* do not rely on params below */ $search = db_escape_string($this->link, $_REQUEST["search"]); -- cgit v1.2.3-54-g00ecf From 8d192d025bc2e8f5e6e5e5aa843f7c6fffd9448e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 2 Apr 2013 10:21:45 +0400 Subject: update 'no articles in label' hint --- classes/feeds.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/feeds.php b/classes/feeds.php index 0c643325f..713460e28 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -739,7 +739,7 @@ class Feeds extends Handler_Protected { break; default: if ($feed < LABEL_BASE_INDEX) { - $message = __("No articles found to display. You can assign articles to labels manually (see the Actions menu above) or use a filter."); + $message = __("No articles found to display. You can assign articles to labels manually from article header context menu (applies to all selected articles) or use a filter."); } else { $message = __("No articles found to display."); } -- cgit v1.2.3-54-g00ecf From 4785420034aefcc9900c4646ce528676313f1a02 Mon Sep 17 00:00:00 2001 From: Daniel Andersson Date: Tue, 2 Apr 2013 09:05:17 +0200 Subject: Add hook to add explanations of hotkey actions via plugins. --- classes/pluginhost.php | 1 + include/functions.php | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'classes') diff --git a/classes/pluginhost.php b/classes/pluginhost.php index 5b8a77fd6..a75027033 100644 --- a/classes/pluginhost.php +++ b/classes/pluginhost.php @@ -27,6 +27,7 @@ class PluginHost { const HOOK_TOOLBAR_BUTTON = 15; const HOOK_ACTION_ITEM = 16; const HOOK_HEADLINE_TOOLBAR_BUTTON = 17; + const HOOK_HOTKEY_INFO = 18; const KIND_ALL = 1; const KIND_SYSTEM = 2; diff --git a/include/functions.php b/include/functions.php index c04e6a81a..aea7618a8 100644 --- a/include/functions.php +++ b/include/functions.php @@ -1934,6 +1934,11 @@ "help_dialog" => __("Show help dialog")) ); + global $pluginhost; + foreach ($pluginhost->get_hooks($pluginhost::HOOK_HOTKEY_INFO) as $plugin) { + $hotkeys = $plugin->hook_hotkey_info($hotkeys); + } + return $hotkeys; } -- cgit v1.2.3-54-g00ecf From 76f2113b359d3c488cc3a149237908cb3bbb535f Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 2 Apr 2013 14:27:15 +0400 Subject: instances: fix a few wrong calls, move genHash method from rpc --- classes/rpc.php | 26 -------------------------- plugins/instances/init.php | 7 +++++++ plugins/instances/instances.js | 10 +++++----- 3 files changed, 12 insertions(+), 31 deletions(-) (limited to 'classes') diff --git a/classes/rpc.php b/classes/rpc.php index 34f623b06..d7872477e 100644 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -640,32 +640,6 @@ class RPC extends Handler_Protected { return; } - function verifyRegexp() { - $reg_exp = $_REQUEST["reg_exp"]; - - $status = @preg_match("/$reg_exp/i", "TEST") !== false; - - print json_encode(array("status" => $status)); - } - - /* function buttonPlugin() { - $pclass = "button_" . basename($_REQUEST['plugin']); - $method = $_REQUEST['plugin_method']; - - if (class_exists($pclass)) { - $plugin = new $pclass($this->link); - if (method_exists($plugin, $method)) { - return $plugin->$method(); - } - } - } */ - - function genHash() { - $hash = sha1(uniqid(rand(), true)); - - print json_encode(array("hash" => $hash)); - } - function batchAddFeeds() { $cat_id = db_escape_string($this->link, $_REQUEST['cat']); $feeds = explode("\n", db_escape_string($this->link, $_REQUEST['feeds'])); diff --git a/plugins/instances/init.php b/plugins/instances/init.php index 6a7f7003a..7f822c7bf 100644 --- a/plugins/instances/init.php +++ b/plugins/instances/init.php @@ -442,5 +442,12 @@ class Instances extends Plugin implements IHandler { return; } + function genHash() { + $hash = sha1(uniqid(rand(), true)); + + print json_encode(array("hash" => $hash)); + } + + } ?> diff --git a/plugins/instances/instances.js b/plugins/instances/instances.js index 4a60692b3..f699acf72 100644 --- a/plugins/instances/instances.js +++ b/plugins/instances/instances.js @@ -11,7 +11,7 @@ function addInstance() { style: "width: 600px", regenKey: function() { new Ajax.Request("backend.php", { - parameters: "?op=rpc&method=genHash", + parameters: "op=pluginhandler&plugin=instances&method=genHash", onComplete: function(transport) { var reply = JSON.parse(transport.responseText); if (reply) @@ -47,7 +47,7 @@ function addInstance() { function updateInstanceList(sort_key) { new Ajax.Request("backend.php", { - parameters: "?op=pref-instances&sort=" + param_escape(sort_key), + parameters: "op=pluginhandler&plugin=instances&sort=" + param_escape(sort_key), onComplete: function(transport) { dijit.byId('instanceConfigTab').attr('content', transport.responseText); selectTab("instanceConfig", true); @@ -62,7 +62,7 @@ function editInstance(id, event) { selectTableRows('prefInstanceList', 'none'); selectTableRowById('LIRR-'+id, 'LICHK-'+id, true); - var query = "backend.php?op=pref-instances&method=edit&id=" + + var query = "backend.php?op=pluginhandler&plugin=instances&method=edit&id=" + param_escape(id); if (dijit.byId("instanceEditDlg")) @@ -74,7 +74,7 @@ function editInstance(id, event) { style: "width: 600px", regenKey: function() { new Ajax.Request("backend.php", { - parameters: "?op=rpc&method=genHash", + parameters: "op=pluginhandler&plugin=instances&method=genHash", onComplete: function(transport) { var reply = JSON.parse(transport.responseText); if (reply) @@ -124,7 +124,7 @@ function removeSelectedInstances() { if (ok) { notify_progress("Removing selected instances..."); - var query = "?op=pref-instances&method=remove&ids="+ + var query = "op=pluginhandler&plugin=instances&method=remove&ids="+ param_escape(sel_rows.toString()); new Ajax.Request("backend.php", { -- cgit v1.2.3-54-g00ecf From 96e3ae8ccebf144880844475b9bbac51ec5cb135 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 2 Apr 2013 14:32:10 +0400 Subject: move batchAddFeeds to pref-feeds --- classes/pref/feeds.php | 37 ++++++++++++++++++++++++++++++++++++- classes/rpc.php | 36 ------------------------------------ 2 files changed, 36 insertions(+), 37 deletions(-) (limited to 'classes') diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index eda03d126..aa018ee10 100644 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -1751,7 +1751,7 @@ class Pref_Feeds extends Handler_Protected { } function batchSubscribe() { - print ""; + print ""; print ""; print "
@@ -1798,6 +1798,41 @@ class Pref_Feeds extends Handler_Protected { "; } + function batchAddFeeds() { + $cat_id = db_escape_string($this->link, $_REQUEST['cat']); + $feeds = explode("\n", db_escape_string($this->link, $_REQUEST['feeds'])); + $login = db_escape_string($this->link, $_REQUEST['login']); + $pass = db_escape_string($this->link, $_REQUEST['pass']); + + foreach ($feeds as $feed) { + $feed = trim($feed); + + if (validate_feed_url($feed)) { + + db_query($this->link, "BEGIN"); + + if ($cat_id == "0" || !$cat_id) { + $cat_qpart = "NULL"; + } else { + $cat_qpart = "'$cat_id'"; + } + + $result = db_query($this->link, + "SELECT id FROM ttrss_feeds + WHERE feed_url = '$feed' AND owner_uid = ".$_SESSION["uid"]); + + if (db_num_rows($result) == 0) { + $result = db_query($this->link, + "INSERT INTO ttrss_feeds + (owner_uid,feed_url,title,cat_id,auth_login,auth_pass,update_method) + VALUES ('".$_SESSION["uid"]."', '$feed', + '[Unknown]', $cat_qpart, '$login', '$pass', 0)"); + } + + db_query($this->link, "COMMIT"); + } + } + } } ?> diff --git a/classes/rpc.php b/classes/rpc.php index d7872477e..36d7083a5 100644 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -640,42 +640,6 @@ class RPC extends Handler_Protected { return; } - function batchAddFeeds() { - $cat_id = db_escape_string($this->link, $_REQUEST['cat']); - $feeds = explode("\n", db_escape_string($this->link, $_REQUEST['feeds'])); - $login = db_escape_string($this->link, $_REQUEST['login']); - $pass = db_escape_string($this->link, $_REQUEST['pass']); - - foreach ($feeds as $feed) { - $feed = trim($feed); - - if (validate_feed_url($feed)) { - - db_query($this->link, "BEGIN"); - - if ($cat_id == "0" || !$cat_id) { - $cat_qpart = "NULL"; - } else { - $cat_qpart = "'$cat_id'"; - } - - $result = db_query($this->link, - "SELECT id FROM ttrss_feeds - WHERE feed_url = '$feed' AND owner_uid = ".$_SESSION["uid"]); - - if (db_num_rows($result) == 0) { - $result = db_query($this->link, - "INSERT INTO ttrss_feeds - (owner_uid,feed_url,title,cat_id,auth_login,auth_pass,update_method) - VALUES ('".$_SESSION["uid"]."', '$feed', - '[Unknown]', $cat_qpart, '$login', '$pass', 0)"); - } - - db_query($this->link, "COMMIT"); - } - } - } - function setScore() { $ids = db_escape_string($this->link, $_REQUEST['id']); $score = (int)db_escape_string($this->link, $_REQUEST['score']); -- cgit v1.2.3-54-g00ecf From c88e4a2af317d5b1dfa60e639df9336a72fe879a Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 2 Apr 2013 14:34:17 +0400 Subject: remove small_article_preview --- cdm.css | 19 ------------------- classes/rpc.php | 27 --------------------------- index.php | 2 -- js/viewfeed.js | 45 --------------------------------------------- 4 files changed, 93 deletions(-) (limited to 'classes') diff --git a/cdm.css b/cdm.css index 13f88dd4e..9893f43fc 100644 --- a/cdm.css +++ b/cdm.css @@ -192,23 +192,4 @@ div.cdm.expanded div.cdmHeader a.title, div.cdm.active div.cdmHeader a.title { font-size : 13px; } -div#small_article_preview { - width : 300px; - max-height : 350px; - overflow : hidden; - border : 1px solid #c0c0c0; - background : white; - position : absolute; - box-shadow : 2px 2px 4px #c0c0c0; - z-index : 2; -} -div#small_article_preview div.content { - padding : 5px; - font-size : 12px; - color : gray; -} - -div#small_article_preview div.content img { - max-width : 290px; -} diff --git a/classes/rpc.php b/classes/rpc.php index 36d7083a5..f0218f91e 100644 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -834,32 +834,5 @@ class RPC extends Handler_Protected { } } - function cdmArticlePreview() { - $id = db_escape_string($this->link, $_REQUEST['id']); - - $result = db_query($this->link, "SELECT link, - ttrss_entries.title, content, feed_url - FROM - ttrss_entries, ttrss_user_entries - LEFT JOIN ttrss_feeds ON (ttrss_user_entries.feed_id = ttrss_feeds.id) - WHERE ref_id = '$id' AND ref_id = ttrss_entries.id AND - ttrss_user_entries.owner_uid = ". $_SESSION["uid"]); - - if (db_num_rows($result) != 0) { - $link = db_fetch_result($result, 0, "link"); - $title = db_fetch_result($result, 0, "title"); - $feed_url = db_fetch_result($result, 0, "feed_url"); - - $content = sanitize($this->link, - db_fetch_result($result, 0, "content"), false, false, $feed_url); - - print "
".$content.""; - - } else { - print "Article not found."; - } - - } - } ?> diff --git a/index.php b/index.php index 3b905d1b1..e390edffd 100644 --- a/index.php +++ b/index.php @@ -140,8 +140,6 @@
- -
 
diff --git a/js/viewfeed.js b/js/viewfeed.js index c24dec62e..e3d73b89b 100644 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -13,8 +13,6 @@ var catchup_timeout_id = false; var cids_requested = []; var loaded_article_ids = []; -var _post_preview_timeout = false; - var has_storage = 'sessionStorage' in window && window['sessionStorage'] !== null; function headlines_callback2(transport, offset, background, infscroll_req) { @@ -1153,53 +1151,10 @@ function getActiveArticleId() { function postMouseIn(e, id) { post_under_pointer = id; - - if (_post_preview_timeout) window.clearTimeout(_post_preview_timeout); - - /* if (!isCdmMode() || !getInitParam("cdm_expanded")) { - _post_preview_timeout = window.setTimeout(function() { - displaySmallArticlePreview(e, id); - }, 1000); - } */ -} - -function displaySmallArticlePreview(e, id) { - try { - var query = "?op=rpc&method=cdmarticlepreview&id=" + id; - - new Ajax.Request("backend.php", { - parameters: query, - onComplete: function(transport) { - cexc = $("CEXC-" + id); - preview = $("small_article_preview"); - row = $("RROW-" + id); - ctr = $("headlines-frame"); - - if (id != getActiveArticleId() && (!isCdmMode() || (cexc && Element.visible(cexc))) && row && preview) { - preview.innerHTML = transport.responseText; - new Effect.Appear(preview, {duration:0.2}); - - preview.setStyle({ - left: (e.clientX + 20) + 'px', - top: (row.offsetTop + row.offsetHeight*2 + 20 - ctr.scrollTop) + 'px' }); - - } - - } }); - - - } catch (e) { - exception_error("displaySmallArticlePreview", e); - } } function postMouseOut(id) { post_under_pointer = false; - - if (_post_preview_timeout) window.clearTimeout(_post_preview_timeout); - - if (Element.visible("small_article_preview")) - Element.hide("small_article_preview"); } function unpackVisibleHeadlines() { -- cgit v1.2.3-54-g00ecf From 8956b3a607be2d0a28704713d6a5d915e6c82fd3 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 2 Apr 2013 14:36:00 +0400 Subject: remove obsolete checkDate stuff --- classes/rpc.php | 8 -------- js/functions.js | 50 -------------------------------------------------- 2 files changed, 58 deletions(-) (limited to 'classes') diff --git a/classes/rpc.php b/classes/rpc.php index f0218f91e..64e09d1e7 100644 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -480,14 +480,6 @@ class RPC extends Handler_Protected { print json_encode($articles); } - function checkDate() { - $date = db_escape_string($this->link, $_REQUEST["date"]); - $date_parsed = strtotime($date); - - print json_encode(array("result" => (bool)$date_parsed, - "date" => date("c", $date_parsed))); - } - function assigntolabel() { return $this->labelops(true); } diff --git a/js/functions.js b/js/functions.js index 0b39cc466..560742598 100644 --- a/js/functions.js +++ b/js/functions.js @@ -548,28 +548,6 @@ function fatalError(code, msg, ext_info) { } } -/* function filterDlgCheckType(sender) { - - try { - - var ftype = sender.value; - - // if selected filter type is 5 (Date) enable the modifier dropbox - if (ftype == 5) { - Element.show("filterDlg_dateModBox"); - Element.show("filterDlg_dateChkBox"); - } else { - Element.hide("filterDlg_dateModBox"); - Element.hide("filterDlg_dateChkBox"); - - } - - } catch (e) { - exception_error("filterDlgCheckType", e); - } - -} */ - function filterDlgCheckAction(sender) { try { @@ -603,34 +581,6 @@ function filterDlgCheckAction(sender) { } -function filterDlgCheckDate() { - try { - var dialog = dijit.byId("filterEditDlg"); - - var reg_exp = dialog.attr('value').reg_exp; - - var query = "?op=rpc&method=checkDate&date=" + reg_exp; - - new Ajax.Request("backend.php", { - parameters: query, - onComplete: function(transport) { - - var reply = JSON.parse(transport.responseText); - - if (reply['result'] == true) { - alert(__("Date syntax appears to be correct:") + " " + reply['date']); - return; - } else { - alert(__("Date syntax is incorrect.")); - } - - } }); - - - } catch (e) { - exception_error("filterDlgCheckDate", e); - } -} function explainError(code) { return displayDlg(__("Error explained"), "explainError", code); -- cgit v1.2.3-54-g00ecf From d719b062404f551594bbe5ee37f1eb306061c118 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 2 Apr 2013 14:41:41 +0400 Subject: rpc: move setScore to article --- classes/article.php | 11 +++++++++++ classes/rpc.php | 11 ----------- js/viewfeed.js | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'classes') diff --git a/classes/article.php b/classes/article.php index 79c94f59b..6e4236936 100644 --- a/classes/article.php +++ b/classes/article.php @@ -208,5 +208,16 @@ class Article extends Handler_Protected { } + function setScore() { + $ids = db_escape_string($this->link, $_REQUEST['id']); + $score = (int)db_escape_string($this->link, $_REQUEST['score']); + + db_query($this->link, "UPDATE ttrss_user_entries SET + score = '$score' WHERE ref_id IN ($ids) AND owner_uid = " . $_SESSION["uid"]); + + print json_encode(array("id" => $id, + "score_pic" => get_score_pic($score))); + } + } diff --git a/classes/rpc.php b/classes/rpc.php index 64e09d1e7..d61b2891a 100644 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -632,17 +632,6 @@ class RPC extends Handler_Protected { return; } - function setScore() { - $ids = db_escape_string($this->link, $_REQUEST['id']); - $score = (int)db_escape_string($this->link, $_REQUEST['score']); - - db_query($this->link, "UPDATE ttrss_user_entries SET - score = '$score' WHERE ref_id IN ($ids) AND owner_uid = " . $_SESSION["uid"]); - - print json_encode(array("id" => $id, - "score_pic" => get_score_pic($score))); - } - function setpanelmode() { $wide = (int) $_REQUEST["wide"]; diff --git a/js/viewfeed.js b/js/viewfeed.js index e3d73b89b..be2b88f4d 100644 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -2020,7 +2020,7 @@ function setSelectionScore() { var score = prompt(__("Please enter new score for selected articles:"), score); if (score != undefined) { - var query = "op=rpc&method=setScore&id=" + param_escape(ids.toString()) + + var query = "op=article&method=setScore&id=" + param_escape(ids.toString()) + "&score=" + param_escape(score); new Ajax.Request("backend.php", { @@ -2063,7 +2063,7 @@ function changeScore(id, pic) { if (new_score != undefined) { - var query = "op=rpc&method=setScore&id=" + param_escape(id) + + var query = "op=article&method=setScore&id=" + param_escape(id) + "&score=" + param_escape(new_score); new Ajax.Request("backend.php", { -- cgit v1.2.3-54-g00ecf From 195187c4903583846edbd58516809ae743bd110e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 2 Apr 2013 14:47:43 +0400 Subject: rpc: move several feed-related calls to pref-feeds --- classes/pref/feeds.php | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ classes/rpc.php | 47 ----------------------------------------------- js/functions.js | 2 +- js/prefs.js | 4 ++-- 4 files changed, 52 insertions(+), 50 deletions(-) (limited to 'classes') diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index aa018ee10..7fb64623e 100644 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -1834,5 +1834,54 @@ class Pref_Feeds extends Handler_Protected { } } + function regenOPMLKey() { + $this->update_feed_access_key($this->link, 'OPML:Publish', + false, $_SESSION["uid"]); + + $new_link = Opml::opml_publish_url($this->link); + + print json_encode(array("link" => $new_link)); + } + + function regenFeedKey() { + $feed_id = db_escape_string($this->link, $_REQUEST['id']); + $is_cat = db_escape_string($this->link, $_REQUEST['is_cat']) == "true"; + + $new_key = $this->update_feed_access_key($this->link, $feed_id, $is_cat); + + print json_encode(array("link" => $new_key)); + } + + + private function update_feed_access_key($link, $feed_id, $is_cat, $owner_uid = false) { + if (!$owner_uid) $owner_uid = $_SESSION["uid"]; + + $sql_is_cat = bool_to_sql_bool($is_cat); + + $result = db_query($link, "SELECT access_key FROM ttrss_access_keys + WHERE feed_id = '$feed_id' AND is_cat = $sql_is_cat + AND owner_uid = " . $owner_uid); + + if (db_num_rows($result) == 1) { + $key = db_escape_string($this->link, sha1(uniqid(rand(), true))); + + db_query($link, "UPDATE ttrss_access_keys SET access_key = '$key' + WHERE feed_id = '$feed_id' AND is_cat = $sql_is_cat + AND owner_uid = " . $owner_uid); + + return $key; + + } else { + return get_feed_access_key($link, $feed_id, $is_cat, $owner_uid); + } + } + + // Silent + function clearKeys() { + db_query($this->link, "DELETE FROM ttrss_access_keys WHERE + owner_uid = " . $_SESSION["uid"]); + } + + } ?> diff --git a/classes/rpc.php b/classes/rpc.php index d61b2891a..3593bd5d8 100644 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -411,15 +411,6 @@ class RPC extends Handler_Protected { "content" => $tags_str, "content_full" => $tags_str_full)); } - function regenOPMLKey() { - $this->update_feed_access_key($this->link, 'OPML:Publish', - false, $_SESSION["uid"]); - - $new_link = Opml::opml_publish_url($this->link); - - print json_encode(array("link" => $new_link)); - } - function completeLabels() { $search = db_escape_string($this->link, $_REQUEST["search"]); @@ -609,21 +600,6 @@ class RPC extends Handler_Protected { print_feed_cat_select($this->link, "cat_id", $id); } - function regenFeedKey() { - $feed_id = db_escape_string($this->link, $_REQUEST['id']); - $is_cat = db_escape_string($this->link, $_REQUEST['is_cat']) == "true"; - - $new_key = $this->update_feed_access_key($this->link, $feed_id, $is_cat); - - print json_encode(array("link" => $new_key)); - } - - // Silent - function clearKeys() { - db_query($this->link, "DELETE FROM ttrss_access_keys WHERE - owner_uid = " . $_SESSION["uid"]); - } - // Silent function clearArticleKeys() { db_query($this->link, "UPDATE ttrss_user_entries SET uuid = '' WHERE @@ -716,29 +692,6 @@ class RPC extends Handler_Protected { } - function update_feed_access_key($link, $feed_id, $is_cat, $owner_uid = false) { - if (!$owner_uid) $owner_uid = $_SESSION["uid"]; - - $sql_is_cat = bool_to_sql_bool($is_cat); - - $result = db_query($link, "SELECT access_key FROM ttrss_access_keys - WHERE feed_id = '$feed_id' AND is_cat = $sql_is_cat - AND owner_uid = " . $owner_uid); - - if (db_num_rows($result) == 1) { - $key = db_escape_string($this->link, sha1(uniqid(rand(), true))); - - db_query($link, "UPDATE ttrss_access_keys SET access_key = '$key' - WHERE feed_id = '$feed_id' AND is_cat = $sql_is_cat - AND owner_uid = " . $owner_uid); - - return $key; - - } else { - return get_feed_access_key($link, $feed_id, $is_cat, $owner_uid); - } - } - private function markArticlesById($link, $ids, $cmode) { $tmp_ids = array(); diff --git a/js/functions.js b/js/functions.js index 560742598..4e4d03557 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1357,7 +1357,7 @@ function genUrlChangeKey(feed, is_cat) { notify_progress("Trying to change address...", true); - var query = "?op=rpc&method=regenFeedKey&id=" + param_escape(feed) + + var query = "?op=pref-feeds&method=regenFeedKey&id=" + param_escape(feed) + "&is_cat=" + param_escape(is_cat); new Ajax.Request("backend.php", { diff --git a/js/prefs.js b/js/prefs.js index 358625e93..b4ecd2584 100644 --- a/js/prefs.js +++ b/js/prefs.js @@ -1221,7 +1221,7 @@ function opmlRegenKey() { notify_progress("Trying to change address...", true); - var query = "?op=rpc&method=regenOPMLKey"; + var query = "?op=pref-feeds&method=regenOPMLKey"; new Ajax.Request("backend.php", { parameters: query, @@ -1521,7 +1521,7 @@ function clearFeedAccessKeys() { if (ok) { notify_progress("Clearing URLs..."); - var query = "?op=rpc&method=clearKeys"; + var query = "?op=pref-feeds&method=clearKeys"; new Ajax.Request("backend.php", { parameters: query, -- cgit v1.2.3-54-g00ecf From 5df8be5c0ac69db8716fcb29a27b2bbc3fbcbace Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 2 Apr 2013 14:52:21 +0400 Subject: rpc: move setArticleTags to article --- classes/article.php | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++- classes/rpc.php | 64 --------------------------------------------------- 2 files changed, 65 insertions(+), 65 deletions(-) (limited to 'classes') diff --git a/classes/article.php b/classes/article.php index 6e4236936..bf1e55662 100644 --- a/classes/article.php +++ b/classes/article.php @@ -185,7 +185,7 @@ class Article extends Handler_Protected { $tags_str = join(", ", $tags); print ""; - print ""; + print ""; print ""; print "
"; @@ -220,4 +220,68 @@ class Article extends Handler_Protected { } + function setArticleTags() { + + $id = db_escape_string($this->link, $_REQUEST["id"]); + + $tags_str = db_escape_string($this->link, $_REQUEST["tags_str"]); + $tags = array_unique(trim_array(explode(",", $tags_str))); + + db_query($this->link, "BEGIN"); + + $result = db_query($this->link, "SELECT int_id FROM ttrss_user_entries WHERE + ref_id = '$id' AND owner_uid = '".$_SESSION["uid"]."' LIMIT 1"); + + if (db_num_rows($result) == 1) { + + $tags_to_cache = array(); + + $int_id = db_fetch_result($result, 0, "int_id"); + + db_query($this->link, "DELETE FROM ttrss_tags WHERE + post_int_id = $int_id AND owner_uid = '".$_SESSION["uid"]."'"); + + foreach ($tags as $tag) { + $tag = sanitize_tag($tag); + + if (!tag_is_valid($tag)) { + continue; + } + + if (preg_match("/^[0-9]*$/", $tag)) { + continue; + } + + // print ""; + + if ($tag != '') { + db_query($this->link, "INSERT INTO ttrss_tags + (post_int_id, owner_uid, tag_name) VALUES ('$int_id', '".$_SESSION["uid"]."', '$tag')"); + } + + array_push($tags_to_cache, $tag); + } + + /* update tag cache */ + + sort($tags_to_cache); + $tags_str = join(",", $tags_to_cache); + + db_query($this->link, "UPDATE ttrss_user_entries + SET tag_cache = '$tags_str' WHERE ref_id = '$id' + AND owner_uid = " . $_SESSION["uid"]); + } + + db_query($this->link, "COMMIT"); + + $tags = get_article_tags($this->link, $id); + $tags_str = format_tags_string($tags, $id); + $tags_str_full = join(", ", $tags); + + if (!$tags_str_full) $tags_str_full = __("no tags"); + + print json_encode(array("id" => (int)$id, + "content" => $tags_str, "content_full" => $tags_str_full)); + } + } diff --git a/classes/rpc.php b/classes/rpc.php index 3593bd5d8..a78e079ca 100644 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -347,70 +347,6 @@ class RPC extends Handler_Protected { print json_encode($reply); } - function setArticleTags() { - - $id = db_escape_string($this->link, $_REQUEST["id"]); - - $tags_str = db_escape_string($this->link, $_REQUEST["tags_str"]); - $tags = array_unique(trim_array(explode(",", $tags_str))); - - db_query($this->link, "BEGIN"); - - $result = db_query($this->link, "SELECT int_id FROM ttrss_user_entries WHERE - ref_id = '$id' AND owner_uid = '".$_SESSION["uid"]."' LIMIT 1"); - - if (db_num_rows($result) == 1) { - - $tags_to_cache = array(); - - $int_id = db_fetch_result($result, 0, "int_id"); - - db_query($this->link, "DELETE FROM ttrss_tags WHERE - post_int_id = $int_id AND owner_uid = '".$_SESSION["uid"]."'"); - - foreach ($tags as $tag) { - $tag = sanitize_tag($tag); - - if (!tag_is_valid($tag)) { - continue; - } - - if (preg_match("/^[0-9]*$/", $tag)) { - continue; - } - - // print ""; - - if ($tag != '') { - db_query($this->link, "INSERT INTO ttrss_tags - (post_int_id, owner_uid, tag_name) VALUES ('$int_id', '".$_SESSION["uid"]."', '$tag')"); - } - - array_push($tags_to_cache, $tag); - } - - /* update tag cache */ - - sort($tags_to_cache); - $tags_str = join(",", $tags_to_cache); - - db_query($this->link, "UPDATE ttrss_user_entries - SET tag_cache = '$tags_str' WHERE ref_id = '$id' - AND owner_uid = " . $_SESSION["uid"]); - } - - db_query($this->link, "COMMIT"); - - $tags = get_article_tags($this->link, $id); - $tags_str = format_tags_string($tags, $id); - $tags_str_full = join(", ", $tags); - - if (!$tags_str_full) $tags_str_full = __("no tags"); - - print json_encode(array("id" => (int)$id, - "content" => $tags_str, "content_full" => $tags_str_full)); - } - function completeLabels() { $search = db_escape_string($this->link, $_REQUEST["search"]); -- cgit v1.2.3-54-g00ecf From c83554bdddd1efb8a600d2dc6dbd119e3104013c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 2 Apr 2013 14:53:36 +0400 Subject: rpc: move completeTags to article --- classes/article.php | 17 +++++++++++++++++ classes/rpc.php | 16 ---------------- js/viewfeed.js | 2 +- 3 files changed, 18 insertions(+), 17 deletions(-) (limited to 'classes') diff --git a/classes/article.php b/classes/article.php index bf1e55662..e75af0e7a 100644 --- a/classes/article.php +++ b/classes/article.php @@ -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 "
    "; + while ($line = db_fetch_assoc($result)) { + print "
  • " . $line["tag_name"] . "
  • "; + } + print "
"; + } + + } diff --git a/classes/rpc.php b/classes/rpc.php index a78e079ca..04b763c46 100644 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -363,22 +363,6 @@ class RPC extends Handler_Protected { print ""; } - - 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 "
    "; - while ($line = db_fetch_assoc($result)) { - print "
  • " . $line["tag_name"] . "
  • "; - } - print "
"; - } - function purge() { $ids = explode(",", db_escape_string($this->link, $_REQUEST["ids"])); $days = sprintf("%d", $_REQUEST["days"]); diff --git a/js/viewfeed.js b/js/viewfeed.js index be2b88f4d..31eff1b8a 100644 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -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" }); }); -- cgit v1.2.3-54-g00ecf From 9c96a3e28cb360fc79d1e58f4871ce47ad55333e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 2 Apr 2013 14:54:31 +0400 Subject: rpc: remove getArticles --- classes/rpc.php | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'classes') diff --git a/classes/rpc.php b/classes/rpc.php index 04b763c46..de52a9e8c 100644 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -378,19 +378,6 @@ class RPC extends Handler_Protected { } } - function getArticles() { - $ids = explode(",", db_escape_string($this->link, $_REQUEST["ids"])); - $articles = array(); - - foreach ($ids as $id) { - if ($id) { - array_push($articles, format_article($this->link, $id, 0, false)); - } - } - - print json_encode($articles); - } - function assigntolabel() { return $this->labelops(true); } -- cgit v1.2.3-54-g00ecf From 4b7726f0b44db36ad12c0a0918a9129c8cbb1caa Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 2 Apr 2013 14:56:08 +0400 Subject: rpc: move labelops to article --- classes/article.php | 42 ++++++++++++++++++++++++++++++++++++++++++ classes/rpc.php | 41 ----------------------------------------- js/viewfeed.js | 4 ++-- 3 files changed, 44 insertions(+), 43 deletions(-) (limited to 'classes') diff --git a/classes/article.php b/classes/article.php index e75af0e7a..9a0970140 100644 --- a/classes/article.php +++ b/classes/article.php @@ -300,5 +300,47 @@ class Article extends Handler_Protected { print ""; } + function assigntolabel() { + return $this->labelops(true); + } + + function removefromlabel() { + return $this->labelops(false); + } + + private function labelops($assign) { + $reply = array(); + + $ids = explode(",", db_escape_string($this->link, $_REQUEST["ids"])); + $label_id = db_escape_string($this->link, $_REQUEST["lid"]); + + $label = db_escape_string($this->link, label_find_caption($this->link, $label_id, + $_SESSION["uid"])); + + $reply["info-for-headlines"] = array(); + + if ($label) { + + foreach ($ids as $id) { + + if ($assign) + label_add_article($this->link, $id, $label, $_SESSION["uid"]); + else + label_remove_article($this->link, $id, $label, $_SESSION["uid"]); + + $labels = get_article_labels($this->link, $id, $_SESSION["uid"]); + + array_push($reply["info-for-headlines"], + array("id" => $id, "labels" => format_article_labels($labels, $id))); + + } + } + + $reply["message"] = "UPDATE_COUNTERS"; + + print json_encode($reply); + } + + } diff --git a/classes/rpc.php b/classes/rpc.php index de52a9e8c..a63392095 100644 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -378,47 +378,6 @@ class RPC extends Handler_Protected { } } - function assigntolabel() { - return $this->labelops(true); - } - - function removefromlabel() { - return $this->labelops(false); - } - - function labelops($assign) { - $reply = array(); - - $ids = explode(",", db_escape_string($this->link, $_REQUEST["ids"])); - $label_id = db_escape_string($this->link, $_REQUEST["lid"]); - - $label = db_escape_string($this->link, label_find_caption($this->link, $label_id, - $_SESSION["uid"])); - - $reply["info-for-headlines"] = array(); - - if ($label) { - - foreach ($ids as $id) { - - if ($assign) - label_add_article($this->link, $id, $label, $_SESSION["uid"]); - else - label_remove_article($this->link, $id, $label, $_SESSION["uid"]); - - $labels = get_article_labels($this->link, $id, $_SESSION["uid"]); - - array_push($reply["info-for-headlines"], - array("id" => $id, "labels" => format_article_labels($labels, $id))); - - } - } - - $reply["message"] = "UPDATE_COUNTERS"; - - print json_encode($reply); - } - function updateFeedBrowser() { $search = db_escape_string($this->link, $_REQUEST["search"]); $limit = db_escape_string($this->link, $_REQUEST["limit"]); diff --git a/js/viewfeed.js b/js/viewfeed.js index 31eff1b8a..48137a136 100644 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -678,7 +678,7 @@ function selectionRemoveLabel(id, ids) { return; } - var query = "?op=rpc&method=removeFromLabel&ids=" + + var query = "?op=article&method=removeFromLabel&ids=" + param_escape(ids.toString()) + "&lid=" + param_escape(id); console.log(query); @@ -706,7 +706,7 @@ function selectionAssignLabel(id, ids) { return; } - var query = "?op=rpc&method=assignToLabel&ids=" + + var query = "?op=article&method=assignToLabel&ids=" + param_escape(ids.toString()) + "&lid=" + param_escape(id); console.log(query); -- cgit v1.2.3-54-g00ecf From f17cac6b26c4df018e8fda97925411d8267c1310 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 2 Apr 2013 15:32:47 +0400 Subject: retire DEFAULT_ARTICLE_LIMIT, infinite scrolling is fast enough to make it superfluous --- classes/feeds.php | 2 +- classes/pref/prefs.php | 11 ++--------- include/db-prefs.php | 4 ---- include/functions.php | 2 +- js/viewfeed.js | 2 +- 5 files changed, 5 insertions(+), 16 deletions(-) (limited to 'classes') diff --git a/classes/feeds.php b/classes/feeds.php index 713460e28..778850fc4 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -796,7 +796,7 @@ class Feeds extends Handler_Protected { $feed = db_escape_string($this->link, $_REQUEST["feed"]); $method = db_escape_string($this->link, $_REQUEST["m"]); $view_mode = db_escape_string($this->link, $_REQUEST["view_mode"]); - $limit = (int) get_pref($this->link, "DEFAULT_ARTICLE_LIMIT"); + $limit = 30; @$cat_view = $_REQUEST["cat"] == "true"; @$next_unread_feed = db_escape_string($this->link, $_REQUEST["nuf"]); @$offset = db_escape_string($this->link, $_REQUEST["skip"]); diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index cc523092f..fba9f70d8 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -120,7 +120,7 @@ class Pref_Prefs extends Handler_Protected { global $access_level_names; $prefs_blacklist = array("STRIP_UNSAFE_TAGS", "REVERSE_HEADLINES", - "SORT_HEADLINES_BY_FEED_DATE"); + "SORT_HEADLINES_BY_FEED_DATE", "DEFAULT_ARTICLE_LIMIT"); /* "FEEDS_SORT_BY_UNREAD", "HIDE_READ_FEEDS", "REVERSE_HEADLINES" */ @@ -498,13 +498,6 @@ class Pref_Prefs extends Handler_Protected { 'dojoType="dijit.form.Select"'); - } else if ($pref_name == "DEFAULT_ARTICLE_LIMIT") { - - $limits = array(15, 30, 45, 60); - - print_select($pref_name, $value, $limits, - 'dojoType="dijit.form.Select"'); - } else if ($pref_name == "DEFAULT_UPDATE_INTERVAL") { global $update_intervals_nodefault; @@ -528,7 +521,7 @@ class Pref_Prefs extends Handler_Protected { print ""; - } else if (array_search($pref_name, array('FRESH_ARTICLE_MAX_AGE', 'DEFAULT_ARTICLE_LIMIT', + } else if (array_search($pref_name, array('FRESH_ARTICLE_MAX_AGE', 'PURGE_OLD_DAYS', 'LONG_DATE_FORMAT', 'SHORT_DATE_FORMAT')) !== false) { $regexp = ($type_name == 'integer') ? 'regexp="^\d*$"' : ''; diff --git a/include/db-prefs.php b/include/db-prefs.php index f6a78939b..1ee3d609a 100644 --- a/include/db-prefs.php +++ b/include/db-prefs.php @@ -166,10 +166,6 @@ $value = sprintf("%d", $value); } - if ($pref_name == 'DEFAULT_ARTICLE_LIMIT' && $value == 0) { - $value = 30; - } - if ($pref_name == 'USER_TIMEZONE' && $value == '') { $value = 'UTC'; } diff --git a/include/functions.php b/include/functions.php index c04e6a81a..92690cfbb 100644 --- a/include/functions.php +++ b/include/functions.php @@ -1840,7 +1840,7 @@ foreach (array("ON_CATCHUP_SHOW_NEXT_FEED", "HIDE_READ_FEEDS", "ENABLE_FEED_CATS", "FEEDS_SORT_BY_UNREAD", "CONFIRM_FEED_CATCHUP", - "CDM_AUTO_CATCHUP", "FRESH_ARTICLE_MAX_AGE", "DEFAULT_ARTICLE_LIMIT", + "CDM_AUTO_CATCHUP", "FRESH_ARTICLE_MAX_AGE", "HIDE_READ_SHOWS_SPECIAL", "COMBINED_DISPLAY_MODE") as $param) { $params[strtolower($param)] = (int) get_pref($link, $param); diff --git a/js/viewfeed.js b/js/viewfeed.js index 48137a136..c1163eab7 100644 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -64,7 +64,7 @@ function headlines_callback2(transport, offset, background, infscroll_req) { vgroup_last_feed = reply['headlines-info']['vgroup_last_feed']; - if (parseInt(headlines_count) < getInitParam("default_article_limit")) { + if (parseInt(headlines_count) < 30) { _infscroll_disable = 1; } else { _infscroll_disable = 0; -- cgit v1.2.3-54-g00ecf From dfad9d7a36f1efeafd4e3b5bf1f38dac7aad8de4 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 2 Apr 2013 16:20:06 +0400 Subject: pref-prefs: don't use schema-defined help/desc/section names --- classes/pref/prefs.php | 102 +++++++++++++++++++++++++++++++----- include/localized_schema.php | 67 ----------------------- utils/update-schema-translations.sh | 23 -------- utils/update-translations.sh | 2 - 4 files changed, 88 insertions(+), 106 deletions(-) delete mode 100644 include/localized_schema.php delete mode 100755 utils/update-schema-translations.sh (limited to 'classes') diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index fba9f70d8..d4fad41ac 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -1,12 +1,63 @@ pref_sections = array( + 1 => __('General'), + 2 => __('Interface'), + 3 => __('Advanced'), + 4 => __('Digest') + ); + + $this->pref_help = array( + "ALLOW_DUPLICATE_POSTS" => array(__("Allow duplicate posts")), + "AUTO_ASSIGN_LABELS" => array(__("Assign articles to labels automatically"), __("")), + "BLACKLISTED_TAGS" => array(__("Blacklisted tags"), __("When auto-detecting tags in articles these tags will not be applied (comma-separated list)")), + "CDM_AUTO_CATCHUP" => array(__("Automatically mark articles as read"), __("Mark articles as read automatically while you scroll article list.")), + "CDM_EXPANDED" => array(__("Automatically expand articles in combined mode"), __("")), + "COMBINED_DISPLAY_MODE" => array(__("Combined feed display"), __("Display expanded list of feed articles, instead of separate displays for headlines and article content")), + "CONFIRM_FEED_CATCHUP" => array(__("Confirm marking feed as read"), __("")), + "DEFAULT_ARTICLE_LIMIT" => array(__("Amount of articles to display at once"), __("")), + "DEFAULT_UPDATE_INTERVAL" => array(__("Default feed update interval"), __("")), + "DIGEST_CATCHUP" => array(__("Mark articles in e-mail digest as read"), __("")), + "DIGEST_ENABLE" => array(__("Enable email digest"), __("This option enables sending daily digest of new (and unread) headlines on your configured e-mail address")), + "DIGEST_PREFERRED_TIME" => array(__("Try to send digests around specified time"), __("Uses UTC timezone")), + "ENABLE_API_ACCESS" => array(__("Enable external API"), __("")), + "ENABLE_FEED_CATS" => array(__("Enable feed categories"), __("")), + "FEEDS_SORT_BY_UNREAD" => array(__("Sort feeds by unread articles count"), __("")), + "FRESH_ARTICLE_MAX_AGE" => array(__("Maximum age of fresh articles (in hours)"), __("")), + "HIDE_READ_FEEDS" => array(__("Hide feeds with no unread articles"), __("")), + "HIDE_READ_SHOWS_SPECIAL" => array(__("Show special feeds and labels when hiding read feeds"), __("")), + "LONG_DATE_FORMAT" => array(__("Long date format"), __("")), + "ON_CATCHUP_SHOW_NEXT_FEED" => array(__("On catchup show next feed"), __("Automatically open next feed with unread articles after marking one as read")), + "PURGE_OLD_DAYS" => array(__("Purge articles after this number of days (0 - disables)"), __("")), + "PURGE_UNREAD_ARTICLES" => array(__("Purge unread articles"), __("")), + "REVERSE_HEADLINES" => array(__("Reverse headline order (oldest first)"), __("")), + "SHORT_DATE_FORMAT" => array(__("Short date format"), __("")), + "SHOW_CONTENT_PREVIEW" => array(__("Show content preview in headlines list"), __("")), + "SORT_HEADLINES_BY_FEED_DATE" => array(__("Sort headlines by feed date"), __("Use feed-specified date to sort headlines instead of local import date.")), + "SSL_CERT_SERIAL" => array(__("Login with an SSL certificate"), __("Click to register your SSL client certificate with tt-rss")), + "STRIP_IMAGES" => array(__("Do not embed images in articles"), __("")), + "STRIP_UNSAFE_TAGS" => array(__("Strip unsafe tags from articles"), __("Strip all but most common HTML tags when reading articles.")), + "USER_CSS_THEME" => array(__("Select theme"), __("Select one of the available CSS themes")), + "USER_STYLESHEET" => array(__("Customize stylesheet"), __("Customize CSS stylesheet to your liking")), + "USER_TIMEZONE" => array(__("User timezone"), __("")), + "VFEED_GROUP_BY_FEED" => array(__("Group headlines in virtual feeds"), __("When this option is enabled, headlines in Special feeds and Labels are grouped by feeds")) + ); + } + function changepassword() { $old_pw = $_POST["old_password"]; @@ -416,18 +467,17 @@ class Pref_Prefs extends Handler_Protected { $access_query = 'true'; $result = db_query($this->link, "SELECT DISTINCT - ttrss_user_prefs.pref_name,short_desc,help_text,value,type_name, + ttrss_user_prefs.pref_name,value,type_name, ttrss_prefs_sections.order_id, - section_name,def_value,section_id + def_value,section_id FROM ttrss_prefs,ttrss_prefs_types,ttrss_prefs_sections,ttrss_user_prefs WHERE type_id = ttrss_prefs_types.id AND $profile_qpart AND section_id = ttrss_prefs_sections.id AND ttrss_user_prefs.pref_name = ttrss_prefs.pref_name AND $access_query AND - short_desc != '' AND owner_uid = ".$_SESSION["uid"]." - ORDER BY ttrss_prefs_sections.order_id,short_desc"); + ORDER BY ttrss_prefs_sections.order_id,pref_name"); $lnum = 0; @@ -441,12 +491,22 @@ class Pref_Prefs extends Handler_Protected { continue; } + $type_name = $line["type_name"]; + $pref_name = $line["pref_name"]; + $section_name = $this->getSectionName($line["section_id"]); + $value = $line["value"]; + + $short_desc = $this->getShortDesc($pref_name); + $help_text = $this->getHelpText($pref_name); + + if (!$short_desc) continue; + if ($_SESSION["profile"] && in_array($line["pref_name"], $profile_blacklist)) { continue; } - if ($active_section != $line["section_name"]) { + if ($active_section != $line["section_id"]) { if ($active_section != "") { print "
"; @@ -454,24 +514,18 @@ class Pref_Prefs extends Handler_Protected { print ""; - $active_section = $line["section_name"]; + $active_section = $line["section_id"]; - print ""; + print ""; $lnum = 0; } print ""; - $type_name = $line["type_name"]; - $pref_name = $line["pref_name"]; - $value = $line["value"]; - $def_value = $line["def_value"]; - $help_text = $line["help_text"]; - print "

".__($active_section)."

".$section_name."

"; print ""; if ($help_text) print "
".__($help_text)."
"; @@ -1007,6 +1061,26 @@ class Pref_Prefs extends Handler_Protected { } + private function getShortDesc($pref_name) { + if (isset($this->pref_help[$pref_name])) { + return $this->pref_help[$pref_name][0]; + } + return ""; + } + private function getHelpText($pref_name) { + if (isset($this->pref_help[$pref_name])) { + return $this->pref_help[$pref_name][1]; + } + return ""; + } + + private function getSectionName($id) { + if (isset($this->pref_sections[$id])) { + return $this->pref_sections[$id]; + } + + return ""; + } } ?> diff --git a/include/localized_schema.php b/include/localized_schema.php deleted file mode 100644 index 418c9d014..000000000 --- a/include/localized_schema.php +++ /dev/null @@ -1,67 +0,0 @@ - diff --git a/utils/update-schema-translations.sh b/utils/update-schema-translations.sh deleted file mode 100755 index d76fb03a4..000000000 --- a/utils/update-schema-translations.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -LC_ALL=C -LANG=C -LANGUAGE=C - -BASENAME=`basename $0` -TMPFILE="/tmp/$BASENAME-$$.tmp" -OUTFILE="include/localized_schema.php" - -cat schema/ttrss_schema_pgsql.sql | grep 'insert.*pref_name' | awk -F\' '{ print $8 }' > $TMPFILE -cat schema/ttrss_schema_pgsql.sql | grep 'insert.*pref_name' | awk -F\' '{ print $6 }' >> $TMPFILE - -echo " $OUTFILE -echo >> $OUTFILE -cat utils/localized_schema.txt >> $OUTFILE -echo >> $OUTFILE - -cat $TMPFILE | grep -v '^$' | sed "s/.*/__('&');/" >> $OUTFILE - -echo "?>" >> $OUTFILE - -rm $TMPFILE diff --git a/utils/update-translations.sh b/utils/update-translations.sh index c2e8ff54f..4b8dab6b9 100755 --- a/utils/update-translations.sh +++ b/utils/update-translations.sh @@ -1,8 +1,6 @@ #!/bin/sh TEMPLATE=messages.pot -./utils/update-schema-translations.sh - xgettext -kT_js_decl -kT_sprintf -kT_ngettext:1,2 -k__ -L PHP -o $TEMPLATE *.php include/*.php `find classes -iname '*.php'` `find plugins -iname '*.php'` xgettext --from-code utf-8 -k__ -knotify_info -knotify_progress -kngettext -L Java -j -o $TEMPLATE js/*.js `find plugins -iname '*.js'` -- cgit v1.2.3-54-g00ecf From 5f462963a02dd08ec3bf10be94823720653a37b3 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 2 Apr 2013 16:38:12 +0400 Subject: remove blank string gettext invocations --- classes/pref/prefs.php | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'classes') diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index d4fad41ac..aa94939b3 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -22,38 +22,38 @@ class Pref_Prefs extends Handler_Protected { ); $this->pref_help = array( - "ALLOW_DUPLICATE_POSTS" => array(__("Allow duplicate posts")), - "AUTO_ASSIGN_LABELS" => array(__("Assign articles to labels automatically"), __("")), + "ALLOW_DUPLICATE_POSTS" => array(__("Allow duplicate articles")), + "AUTO_ASSIGN_LABELS" => array(__("Assign articles to labels automatically"), ""), "BLACKLISTED_TAGS" => array(__("Blacklisted tags"), __("When auto-detecting tags in articles these tags will not be applied (comma-separated list)")), "CDM_AUTO_CATCHUP" => array(__("Automatically mark articles as read"), __("Mark articles as read automatically while you scroll article list.")), - "CDM_EXPANDED" => array(__("Automatically expand articles in combined mode"), __("")), + "CDM_EXPANDED" => array(__("Automatically expand articles in combined mode"), ""), "COMBINED_DISPLAY_MODE" => array(__("Combined feed display"), __("Display expanded list of feed articles, instead of separate displays for headlines and article content")), - "CONFIRM_FEED_CATCHUP" => array(__("Confirm marking feed as read"), __("")), - "DEFAULT_ARTICLE_LIMIT" => array(__("Amount of articles to display at once"), __("")), - "DEFAULT_UPDATE_INTERVAL" => array(__("Default feed update interval"), __("")), - "DIGEST_CATCHUP" => array(__("Mark articles in e-mail digest as read"), __("")), + "CONFIRM_FEED_CATCHUP" => array(__("Confirm marking feed as read"), ""), + "DEFAULT_ARTICLE_LIMIT" => array(__("Amount of articles to display at once"), ""), + "DEFAULT_UPDATE_INTERVAL" => array(__("Default feed update interval"), ""), + "DIGEST_CATCHUP" => array(__("Mark articles in e-mail digest as read"), ""), "DIGEST_ENABLE" => array(__("Enable email digest"), __("This option enables sending daily digest of new (and unread) headlines on your configured e-mail address")), "DIGEST_PREFERRED_TIME" => array(__("Try to send digests around specified time"), __("Uses UTC timezone")), - "ENABLE_API_ACCESS" => array(__("Enable external API"), __("")), - "ENABLE_FEED_CATS" => array(__("Enable feed categories"), __("")), - "FEEDS_SORT_BY_UNREAD" => array(__("Sort feeds by unread articles count"), __("")), - "FRESH_ARTICLE_MAX_AGE" => array(__("Maximum age of fresh articles (in hours)"), __("")), - "HIDE_READ_FEEDS" => array(__("Hide feeds with no unread articles"), __("")), - "HIDE_READ_SHOWS_SPECIAL" => array(__("Show special feeds and labels when hiding read feeds"), __("")), - "LONG_DATE_FORMAT" => array(__("Long date format"), __("")), + "ENABLE_API_ACCESS" => array(__("Enable external API"), ""), + "ENABLE_FEED_CATS" => array(__("Enable feed categories"), ""), + "FEEDS_SORT_BY_UNREAD" => array(__("Sort feeds by unread articles count"), ""), + "FRESH_ARTICLE_MAX_AGE" => array(__("Maximum age of fresh articles (in hours)"), ""), + "HIDE_READ_FEEDS" => array(__("Hide feeds with no unread articles"), ""), + "HIDE_READ_SHOWS_SPECIAL" => array(__("Show special feeds and labels when hiding read feeds"), ""), + "LONG_DATE_FORMAT" => array(__("Long date format"), ""), "ON_CATCHUP_SHOW_NEXT_FEED" => array(__("On catchup show next feed"), __("Automatically open next feed with unread articles after marking one as read")), - "PURGE_OLD_DAYS" => array(__("Purge articles after this number of days (0 - disables)"), __("")), - "PURGE_UNREAD_ARTICLES" => array(__("Purge unread articles"), __("")), - "REVERSE_HEADLINES" => array(__("Reverse headline order (oldest first)"), __("")), - "SHORT_DATE_FORMAT" => array(__("Short date format"), __("")), - "SHOW_CONTENT_PREVIEW" => array(__("Show content preview in headlines list"), __("")), + "PURGE_OLD_DAYS" => array(__("Purge articles after this number of days (0 - disables)"), ""), + "PURGE_UNREAD_ARTICLES" => array(__("Purge unread articles"), ""), + "REVERSE_HEADLINES" => array(__("Reverse headline order (oldest first)"), ""), + "SHORT_DATE_FORMAT" => array(__("Short date format"), ""), + "SHOW_CONTENT_PREVIEW" => array(__("Show content preview in headlines list"), ""), "SORT_HEADLINES_BY_FEED_DATE" => array(__("Sort headlines by feed date"), __("Use feed-specified date to sort headlines instead of local import date.")), "SSL_CERT_SERIAL" => array(__("Login with an SSL certificate"), __("Click to register your SSL client certificate with tt-rss")), - "STRIP_IMAGES" => array(__("Do not embed images in articles"), __("")), + "STRIP_IMAGES" => array(__("Do not embed images in articles"), ""), "STRIP_UNSAFE_TAGS" => array(__("Strip unsafe tags from articles"), __("Strip all but most common HTML tags when reading articles.")), "USER_CSS_THEME" => array(__("Select theme"), __("Select one of the available CSS themes")), "USER_STYLESHEET" => array(__("Customize stylesheet"), __("Customize CSS stylesheet to your liking")), - "USER_TIMEZONE" => array(__("User timezone"), __("")), + "USER_TIMEZONE" => array(__("User timezone"), ""), "VFEED_GROUP_BY_FEED" => array(__("Group headlines in virtual feeds"), __("When this option is enabled, headlines in Special feeds and Labels are grouped by feeds")) ); } -- cgit v1.2.3-54-g00ecf From 9db8e607841be0cd3ee9b73d125c4fe50e330c11 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 2 Apr 2013 16:46:08 +0400 Subject: update pref descriptions --- classes/pref/prefs.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'classes') diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index aa94939b3..938782b51 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -22,24 +22,24 @@ class Pref_Prefs extends Handler_Protected { ); $this->pref_help = array( - "ALLOW_DUPLICATE_POSTS" => array(__("Allow duplicate articles")), + "ALLOW_DUPLICATE_POSTS" => array(__("Allow duplicate articles"), ""), "AUTO_ASSIGN_LABELS" => array(__("Assign articles to labels automatically"), ""), - "BLACKLISTED_TAGS" => array(__("Blacklisted tags"), __("When auto-detecting tags in articles these tags will not be applied (comma-separated list)")), - "CDM_AUTO_CATCHUP" => array(__("Automatically mark articles as read"), __("Mark articles as read automatically while you scroll article list.")), + "BLACKLISTED_TAGS" => array(__("Blacklisted tags"), __("When auto-detecting tags in articles these tags will not be applied (comma-separated list).")), + "CDM_AUTO_CATCHUP" => array(__("Automatically mark articles as read"), __("This option enables marking articles as read automatically while you scroll article list.")), "CDM_EXPANDED" => array(__("Automatically expand articles in combined mode"), ""), "COMBINED_DISPLAY_MODE" => array(__("Combined feed display"), __("Display expanded list of feed articles, instead of separate displays for headlines and article content")), "CONFIRM_FEED_CATCHUP" => array(__("Confirm marking feed as read"), ""), "DEFAULT_ARTICLE_LIMIT" => array(__("Amount of articles to display at once"), ""), - "DEFAULT_UPDATE_INTERVAL" => array(__("Default feed update interval"), ""), + "DEFAULT_UPDATE_INTERVAL" => array(__("Default interval between feed updates"), ""), "DIGEST_CATCHUP" => array(__("Mark articles in e-mail digest as read"), ""), - "DIGEST_ENABLE" => array(__("Enable email digest"), __("This option enables sending daily digest of new (and unread) headlines on your configured e-mail address")), + "DIGEST_ENABLE" => array(__("Enable e-mail digest"), __("This option enables sending daily digest of new (and unread) headlines on your configured e-mail address")), "DIGEST_PREFERRED_TIME" => array(__("Try to send digests around specified time"), __("Uses UTC timezone")), - "ENABLE_API_ACCESS" => array(__("Enable external API"), ""), + "ENABLE_API_ACCESS" => array(__("Enable API access"), __("Allows external clients to access this account through the API")), "ENABLE_FEED_CATS" => array(__("Enable feed categories"), ""), "FEEDS_SORT_BY_UNREAD" => array(__("Sort feeds by unread articles count"), ""), "FRESH_ARTICLE_MAX_AGE" => array(__("Maximum age of fresh articles (in hours)"), ""), "HIDE_READ_FEEDS" => array(__("Hide feeds with no unread articles"), ""), - "HIDE_READ_SHOWS_SPECIAL" => array(__("Show special feeds and labels when hiding read feeds"), ""), + "HIDE_READ_SHOWS_SPECIAL" => array(__("Show special feeds when hiding read feeds"), ""), "LONG_DATE_FORMAT" => array(__("Long date format"), ""), "ON_CATCHUP_SHOW_NEXT_FEED" => array(__("On catchup show next feed"), __("Automatically open next feed with unread articles after marking one as read")), "PURGE_OLD_DAYS" => array(__("Purge articles after this number of days (0 - disables)"), ""), @@ -51,10 +51,9 @@ class Pref_Prefs extends Handler_Protected { "SSL_CERT_SERIAL" => array(__("Login with an SSL certificate"), __("Click to register your SSL client certificate with tt-rss")), "STRIP_IMAGES" => array(__("Do not embed images in articles"), ""), "STRIP_UNSAFE_TAGS" => array(__("Strip unsafe tags from articles"), __("Strip all but most common HTML tags when reading articles.")), - "USER_CSS_THEME" => array(__("Select theme"), __("Select one of the available CSS themes")), "USER_STYLESHEET" => array(__("Customize stylesheet"), __("Customize CSS stylesheet to your liking")), "USER_TIMEZONE" => array(__("User timezone"), ""), - "VFEED_GROUP_BY_FEED" => array(__("Group headlines in virtual feeds"), __("When this option is enabled, headlines in Special feeds and Labels are grouped by feeds")) + "VFEED_GROUP_BY_FEED" => array(__("Group headlines in virtual feeds"), __("Special feeds, labels, and categories are grouped by originating feeds")) ); } -- cgit v1.2.3-54-g00ecf