diff options
Diffstat (limited to 'classes/pref/feeds.php')
| -rw-r--r-- | classes/pref/feeds.php | 55 |
1 files changed, 21 insertions, 34 deletions
diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index e31725111..ffe7410fe 100644 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -36,8 +36,7 @@ class Pref_Feeds extends Handler_Protected { // first one is set by API $show_empty_cats = $_REQUEST['force_show_empty'] || - ($_REQUEST['mode'] != 2 && !$search && - get_pref('_PREFS_SHOW_EMPTY_CATS')); + ($_REQUEST['mode'] != 2 && !$search); $items = array(); @@ -185,8 +184,7 @@ class Pref_Feeds extends Handler_Protected { if ($enable_cats) { $show_empty_cats = $_REQUEST['force_show_empty'] || - ($_REQUEST['mode'] != 2 && !$search && - get_pref('_PREFS_SHOW_EMPTY_CATS')); + ($_REQUEST['mode'] != 2 && !$search); $result = $this->dbh->query("SELECT id, title FROM ttrss_feed_categories WHERE owner_uid = " . $_SESSION["uid"] . " AND parent_cat IS NULL ORDER BY order_id, title"); @@ -305,11 +303,6 @@ class Pref_Feeds extends Handler_Protected { return; } - function togglehiddenfeedcats() { - set_pref('_PREFS_SHOW_EMPTY_CATS', - (get_pref('_PREFS_SHOW_EMPTY_CATS') ? 'false' : 'true')); - } - private function process_category_order(&$data_map, $item_id, $parent_id = false, $nest_level = 0) { $debug = isset($_REQUEST["debug"]); @@ -794,7 +787,7 @@ class Pref_Feeds extends Handler_Protected { print "<input dojoType=\"dijit.form.ValidationTextBox\" disabled=\"1\" style=\"font-size : 16px; width : 20em;\" required=\"1\" - name=\"title\" value=\"$title\">"; + name=\"title\" value=\"\">"; $this->batch_edit_cbox("title"); @@ -805,7 +798,7 @@ class Pref_Feeds extends Handler_Protected { print __('URL:') . " "; print "<input dojoType=\"dijit.form.ValidationTextBox\" disabled=\"1\" required=\"1\" regExp='^(http|https)://.*' style=\"width : 20em\" - name=\"feed_url\" value=\"$feed_url\">"; + name=\"feed_url\" value=\"\">"; $this->batch_edit_cbox("feed_url"); @@ -817,7 +810,7 @@ class Pref_Feeds extends Handler_Protected { print __('Place in category:') . " "; - print_feed_cat_select("cat_id", $cat_id, + print_feed_cat_select("cat_id", false, 'disabled="1" dojoType="dijit.form.Select"'); $this->batch_edit_cbox("cat_id"); @@ -831,7 +824,7 @@ class Pref_Feeds extends Handler_Protected { /* Update Interval */ - print_select_hash("update_interval", $update_interval, $update_intervals, + print_select_hash("update_interval", "", $update_intervals, 'disabled="1" dojoType="dijit.form.Select"'); $this->batch_edit_cbox("update_interval"); @@ -844,7 +837,7 @@ class Pref_Feeds extends Handler_Protected { print __('Article purging:') . " "; - print_select_hash("purge_interval", $purge_interval, $purge_intervals, + print_select_hash("purge_interval", "", $purge_intervals, 'disabled="1" dojoType="dijit.form.Select"'); $this->batch_edit_cbox("purge_interval"); @@ -856,13 +849,13 @@ class Pref_Feeds extends Handler_Protected { print "<input dojoType=\"dijit.form.TextBox\" placeHolder=\"".__("Login")."\" disabled=\"1\" - name=\"auth_login\" value=\"$auth_login\">"; + name=\"auth_login\" value=\"\">"; $this->batch_edit_cbox("auth_login"); print "<br/><input dojoType=\"dijit.form.TextBox\" type=\"password\" name=\"auth_pass\" placeHolder=\"".__("Password")."\" disabled=\"1\" - value=\"$auth_pass\">"; + value=\"\">"; $this->batch_edit_cbox("auth_pass"); @@ -1351,9 +1344,6 @@ class Pref_Feeds extends Handler_Protected { print $error_button; print $inactive_button; - print "<button onclick=\"toggleHiddenFeedCats()\" - dojoType=\"dijit.form.Button\">".__('(Un)hide empty categories')."</button>"; - if (defined('_ENABLE_FEED_DEBUGGING')) { print "<select id=\"feedActionChooser\" onchange=\"feedActionChange()\"> @@ -1418,9 +1408,7 @@ class Pref_Feeds extends Handler_Protected { print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('OPML')."\">"; - print "<p>" . __("Using OPML you can export and import your feeds, filters, labels and Tiny Tiny RSS settings.") . " "; - - print __("Only main settings profile can be migrated using OPML.") . "</p>"; + print_notice(__("Using OPML you can export and import your feeds, filters, labels and Tiny Tiny RSS settings.") . __("Only main settings profile can be migrated using OPML.")); print "<iframe id=\"upload_iframe\" name=\"upload_iframe\" onload=\"opmlImportComplete(this)\" @@ -1463,7 +1451,7 @@ class Pref_Feeds extends Handler_Protected { print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('Firefox integration')."\">"; - print "<p>" . __('This Tiny Tiny RSS site can be used as a Firefox Feed Reader by clicking the link below.') . "</p>"; + print_notice(__('This Tiny Tiny RSS site can be used as a Firefox Feed Reader by clicking the link below.')); print "<p>"; @@ -1480,26 +1468,30 @@ class Pref_Feeds extends Handler_Protected { print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('Published & shared articles / Generated feeds')."\">"; - print "<h3>" . __("Published articles and generated feeds") . "</h3>"; - - print "<p>".__('Published articles are exported as a public RSS feed and can be subscribed by anyone who knows the URL specified below.')."</p>"; + print_notice(__('Published articles are exported as a public RSS feed and can be subscribed by anyone who knows the URL specified below.')); $rss_url = '-2::' . htmlspecialchars(get_self_url_prefix() . "/public.php?op=rss&id=-2&view-mode=all_articles");; + print "<p>"; + print "<button dojoType=\"dijit.form.Button\" onclick=\"return displayDlg('".__("View as RSS")."','generatedFeed', '$rss_url')\">". __('Display URL')."</button> "; print "<button dojoType=\"dijit.form.Button\" onclick=\"return clearFeedAccessKeys()\">". __('Clear all generated URLs')."</button> "; - print "<h3>" . __("Articles shared by URL") . "</h3>"; + print "</p>"; - print "<p>" . __("You can disable all articles shared by unique URLs here.") . "</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"); @@ -1573,7 +1565,7 @@ class Pref_Feeds extends Handler_Protected { GROUP BY ttrss_feeds.title, ttrss_feeds.id, ttrss_feeds.site_url, ttrss_feeds.feed_url ORDER BY last_article"); - print "<h2" .__("These feeds have not been updated with new content for 3 months (oldest first):") . "</h2>"; + print "<p" .__("These feeds have not been updated with new content for 3 months (oldest first):") . "</p>"; print "<div dojoType=\"dijit.Toolbar\">"; print "<div dojoType=\"dijit.form.DropDownButton\">". @@ -1594,7 +1586,6 @@ class Pref_Feeds extends Handler_Protected { while ($line = $this->dbh->fetch_assoc($result)) { - $class = ($lnum % 2) ? "even" : "odd"; $feed_id = $line["id"]; $this_row_id = "id=\"FUPDD-$feed_id\""; @@ -1639,9 +1630,6 @@ class Pref_Feeds extends Handler_Protected { } function feedsWithErrors() { - print "<h2>" . __("These feeds have not been updated because of errors:") . - "</h2>"; - $result = $this->dbh->query("SELECT id,title,feed_url,last_error,site_url FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ".$_SESSION["uid"]); @@ -1664,7 +1652,6 @@ class Pref_Feeds extends Handler_Protected { while ($line = $this->dbh->fetch_assoc($result)) { - $class = ($lnum % 2) ? "even" : "odd"; $feed_id = $line["id"]; $this_row_id = "id=\"FERDD-$feed_id\""; |