// 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();
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");
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"]);
if ($this->dbh->num_rows($result) != 0) {
@unlink(ICONS_DIR . "/$feed_id.ico");
if (rename($icon_file, ICONS_DIR . "/$feed_id.ico")) {
-
- require_once "colors.php";
-
- $favicon_color = $this->dbh->escape_string(
- calculate_avg_color(ICONS_DIR . "/$feed_id.ico"));
-
$this->dbh->query("UPDATE ttrss_feeds SET
- favicon_avg_color = '$favicon_color'
+ favicon_avg_color = ''
WHERE id = '$feed_id'");
$rc = 0;
print "</div>";
+ PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_EDIT_FEED,
+ "hook_prefs_edit_feed", $feed_id);
+
$title = htmlspecialchars($title, ENT_QUOTES);
print "<div class='dlgButtons'>
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");
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");
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");
/* 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");
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");
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");
mark_unread_on_update = $mark_unread_on_update
WHERE id = '$feed_id' AND owner_uid = " . $_SESSION["uid"]);
+ PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_SAVE_FEED,
+ "hook_prefs_save_feed", $feed_id);
+
} else {
$feed_data = array();
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()\">
while ($line = $this->dbh->fetch_assoc($result)) {
- $class = ($lnum % 2) ? "even" : "odd";
$feed_id = $line["id"];
$this_row_id = "id=\"FUPDD-$feed_id\"";
while ($line = $this->dbh->fetch_assoc($result)) {
- $class = ($lnum % 2) ? "even" : "odd";
$feed_id = $line["id"];
$this_row_id = "id=\"FERDD-$feed_id\"";