diff options
Diffstat (limited to 'classes/pref/feeds.php')
-rwxr-xr-x | classes/pref/feeds.php | 71 |
1 files changed, 37 insertions, 34 deletions
diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index 40bbc7ef3..6cbf15a58 100755 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -66,9 +66,9 @@ class Pref_Feeds extends Handler_Protected { $cat['items'] = array(); $cat['checkbox'] = false; $cat['type'] = 'category'; - $cat['unread'] = 0; - $cat['child_unread'] = 0; - $cat['auxcounter'] = 0; + $cat['unread'] = -1; + $cat['child_unread'] = -1; + $cat['auxcounter'] = -1; $cat['parent_id'] = $cat_id; $cat['items'] = $this->get_category_items($line['id']); @@ -95,10 +95,10 @@ class Pref_Feeds extends Handler_Protected { $feed = array(); $feed['id'] = 'FEED:' . $feed_line['id']; $feed['bare_id'] = (int)$feed_line['id']; - $feed['auxcounter'] = 0; + $feed['auxcounter'] = -1; $feed['name'] = $feed_line['title']; $feed['checkbox'] = false; - $feed['unread'] = 0; + $feed['unread'] = -1; $feed['error'] = $feed_line['last_error']; $feed['icon'] = Feeds::getFeedIcon($feed_line['id']); $feed['param'] = make_local_datetime( @@ -153,14 +153,14 @@ class Pref_Feeds extends Handler_Protected { $item = array(); $item['id'] = 'FEED:' . $feed_id; $item['bare_id'] = (int)$feed_id; - $item['auxcounter'] = 0; + $item['auxcounter'] = -1; $item['name'] = $feed['title']; $item['checkbox'] = false; $item['error'] = ''; $item['icon'] = $feed['icon']; $item['param'] = ''; - $item['unread'] = 0; //$feed['sender']->get_unread($feed['id']); + $item['unread'] = -1; $item['type'] = 'feed'; array_push($cat['items'], $item); @@ -218,13 +218,13 @@ class Pref_Feeds extends Handler_Protected { $cat = array(); $cat['id'] = 'CAT:' . $line['id']; $cat['bare_id'] = (int)$line['id']; - $cat['auxcounter'] = 0; + $cat['auxcounter'] = -1; $cat['name'] = $line['title']; $cat['items'] = array(); $cat['checkbox'] = false; $cat['type'] = 'category'; - $cat['unread'] = 0; - $cat['child_unread'] = 0; + $cat['unread'] = -1; + $cat['child_unread'] = -1; $cat['items'] = $this->get_category_items($line['id']); @@ -242,13 +242,13 @@ class Pref_Feeds extends Handler_Protected { $cat = array(); $cat['id'] = 'CAT:0'; $cat['bare_id'] = 0; - $cat['auxcounter'] = 0; + $cat['auxcounter'] = -1; $cat['name'] = __("Uncategorized"); $cat['items'] = array(); $cat['type'] = 'category'; $cat['checkbox'] = false; - $cat['unread'] = 0; - $cat['child_unread'] = 0; + $cat['unread'] = -1; + $cat['child_unread'] = -1; $fsth = $this->pdo->prepare("SELECT id, title,last_error, ".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated, update_interval @@ -263,14 +263,14 @@ class Pref_Feeds extends Handler_Protected { $feed = array(); $feed['id'] = 'FEED:' . $feed_line['id']; $feed['bare_id'] = (int)$feed_line['id']; - $feed['auxcounter'] = 0; + $feed['auxcounter'] = -1; $feed['name'] = $feed_line['title']; $feed['checkbox'] = false; $feed['error'] = $feed_line['last_error']; $feed['icon'] = Feeds::getFeedIcon($feed_line['id']); $feed['param'] = make_local_datetime( $feed_line['last_updated'], true); - $feed['unread'] = 0; + $feed['unread'] = -1; $feed['type'] = 'feed'; $feed['updates_disabled'] = (int)($feed_line['update_interval'] < 0); @@ -298,14 +298,14 @@ class Pref_Feeds extends Handler_Protected { $feed = array(); $feed['id'] = 'FEED:' . $feed_line['id']; $feed['bare_id'] = (int)$feed_line['id']; - $feed['auxcounter'] = 0; + $feed['auxcounter'] = -1; $feed['name'] = $feed_line['title']; $feed['checkbox'] = false; $feed['error'] = $feed_line['last_error']; $feed['icon'] = Feeds::getFeedIcon($feed_line['id']); $feed['param'] = make_local_datetime( $feed_line['last_updated'], true); - $feed['unread'] = 0; + $feed['unread'] = -1; $feed['type'] = 'feed'; $feed['updates_disabled'] = (int)($feed_line['update_interval'] < 0); @@ -571,7 +571,7 @@ class Pref_Feeds extends Handler_Protected { print "<label>" . __('Place in category:') . "</label> "; print_feed_cat_select("cat_id", $cat_id, - 'dojoType="dijit.form.Select"'); + 'dojoType="fox.form.Select"'); print "</fieldset>"; } @@ -595,11 +595,14 @@ class Pref_Feeds extends Handler_Protected { if (DB_TYPE == "pgsql") { $feed_language = $row["feed_language"]; + if (!$feed_language) + $feed_language = get_pref('DEFAULT_SEARCH_LANGUAGE'); + print "<fieldset>"; print "<label>" . __('Language:') . "</label> "; print_select("feed_language", $feed_language, $this::get_ts_languages(), - 'dojoType="dijit.form.Select"'); + 'dojoType="fox.form.Select"'); print "</fieldset>"; } @@ -618,7 +621,7 @@ class Pref_Feeds extends Handler_Protected { print "<label>".__("Interval:")."</label> "; print_select_hash("update_interval", $update_interval, $update_intervals, - 'dojoType="dijit.form.Select"'); + 'dojoType="fox.form.Select"'); print "</fieldset>"; @@ -631,7 +634,7 @@ class Pref_Feeds extends Handler_Protected { print "<label>" . __('Article purging:') . "</label> "; print_select_hash("purge_interval", $purge_interval, $purge_intervals, - 'dojoType="dijit.form.Select" ' . + 'dojoType="fox.form.Select" ' . ((FORCE_ARTICLE_PURGE == 0) ? "" : 'disabled="1"')); print "</fieldset>"; @@ -823,7 +826,7 @@ class Pref_Feeds extends Handler_Protected { print "<label>" . __('Place in category:') . "</label> "; print_feed_cat_select("cat_id", false, - 'disabled="1" dojoType="dijit.form.Select"'); + 'disabled="1" dojoType="fox.form.Select"'); $this->batch_edit_cbox("cat_id"); @@ -837,7 +840,7 @@ class Pref_Feeds extends Handler_Protected { print "<label>" . __('Language:') . "</label> "; print_select("feed_language", "", $this::get_ts_languages(), - 'disabled="1" dojoType="dijit.form.Select"'); + 'disabled="1" dojoType="fox.form.Select"'); $this->batch_edit_cbox("feed_language"); @@ -856,7 +859,7 @@ class Pref_Feeds extends Handler_Protected { print "<label>".__("Interval:")."</label> "; print_select_hash("update_interval", "", $update_intervals, - 'disabled="1" dojoType="dijit.form.Select"'); + 'disabled="1" dojoType="fox.form.Select"'); $this->batch_edit_cbox("update_interval"); @@ -871,7 +874,7 @@ class Pref_Feeds extends Handler_Protected { print "<label>" . __('Article purging:') . "</label> "; print_select_hash("purge_interval", "", $purge_intervals, - 'disabled="1" dojoType="dijit.form.Select"'); + 'disabled="1" dojoType="fox.form.Select"'); $this->batch_edit_cbox("purge_interval"); @@ -1205,7 +1208,7 @@ class Pref_Feeds extends Handler_Protected { print '<div dojoType="dijit.layout.BorderContainer" gutters="false">'; - print "<div region='top' dojoType=\"dijit.Toolbar\">"; #toolbar + print "<div region='top' dojoType=\"fox.Toolbar\">"; #toolbar print "<div style='float : right; padding-right : 4px;'> <input dojoType=\"dijit.form.TextBox\" id=\"feed_search\" size=\"20\" type=\"search\" @@ -1214,7 +1217,7 @@ class Pref_Feeds extends Handler_Protected { __('Search')."</button> </div>"; - print "<div dojoType=\"dijit.form.DropDownButton\">". + print "<div dojoType=\"fox.form.DropDownButton\">". "<span>" . __('Select')."</span>"; print "<div dojoType=\"dijit.Menu\" style=\"display: none;\">"; print "<div onclick=\"dijit.byId('feedTree').model.setAllChecked(true)\" @@ -1223,7 +1226,7 @@ class Pref_Feeds extends Handler_Protected { dojoType=\"dijit.MenuItem\">".__('None')."</div>"; print "</div></div>"; - print "<div dojoType=\"dijit.form.DropDownButton\">". + print "<div dojoType=\"fox.form.DropDownButton\">". "<span>" . __('Feeds')."</span>"; print "<div dojoType=\"dijit.Menu\" style=\"display: none;\">"; print "<div onclick=\"CommonDialogs.quickAddFeed()\" @@ -1239,7 +1242,7 @@ class Pref_Feeds extends Handler_Protected { print "</div></div>"; if (get_pref('ENABLE_FEED_CATS')) { - print "<div dojoType=\"dijit.form.DropDownButton\">". + print "<div dojoType=\"fox.form.DropDownButton\">". "<span>" . __('Categories')."</span>"; print "<div dojoType=\"dijit.Menu\" style=\"display: none;\">"; print "<div onclick=\"dijit.byId('feedTree').createCategory()\" @@ -1446,8 +1449,8 @@ class Pref_Feeds extends Handler_Protected { ORDER BY last_article"); $sth->execute([$_SESSION['uid']]); - print "<div dojoType='dijit.Toolbar'>"; - print "<div dojoType='dijit.form.DropDownButton'>". + print "<div dojoType='fox.Toolbar'>"; + print "<div dojoType='fox.form.DropDownButton'>". "<span>" . __('Select')."</span>"; print "<div dojoType='dijit.Menu' style='display: none'>"; print "<div onclick=\"Tables.select('inactive-feeds-list', true)\" @@ -1503,8 +1506,8 @@ class Pref_Feeds extends Handler_Protected { FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ?"); $sth->execute([$_SESSION['uid']]); - print "<div dojoType=\"dijit.Toolbar\">"; - print "<div dojoType=\"dijit.form.DropDownButton\">". + print "<div dojoType=\"fox.Toolbar\">"; + print "<div dojoType=\"fox.form.DropDownButton\">". "<span>" . __('Select')."</span>"; print "<div dojoType=\"dijit.Menu\" style=\"display: none;\">"; print "<div onclick=\"Tables.select('error-feeds-list', true)\" @@ -1659,7 +1662,7 @@ class Pref_Feeds extends Handler_Protected { if (get_pref('ENABLE_FEED_CATS')) { print "<fieldset>"; print "<label>" . __('Place in category:') . "</label> "; - print_feed_cat_select("cat", false, 'dojoType="dijit.form.Select"'); + print_feed_cat_select("cat", false, 'dojoType="fox.form.Select"'); print "</fieldset>"; } |