]> git.wh0rd.org Git - tt-rss.git/commitdiff
retire DEFAULT_ARTICLE_LIMIT, infinite scrolling is fast enough to make it superfluous
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 2 Apr 2013 11:32:47 +0000 (15:32 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 2 Apr 2013 11:32:47 +0000 (15:32 +0400)
classes/feeds.php
classes/pref/prefs.php
include/db-prefs.php
include/functions.php
js/viewfeed.js

index 713460e28cc5f000895ee23a1683aba8bf8d052b..778850fc40017b624663f922e2ea27f9930b41f8 100644 (file)
@@ -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"]);
index cc523092f4af3996110f6582d2d6edea988889b1..fba9f70d8f758ec07c3f8855de7dbe60ff72570d 100644 (file)
@@ -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 "<input type='checkbox' name='$pref_name' $checked $disabled
                                        dojoType='dijit.form.CheckBox' id='CB_$pref_name' value='1'>";
 
-                       } 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*$"' : '';
index f6a78939b589b5cd5da85e8b07de5124d429090a..1ee3d609a5f4867d98aac5e9250af2ba0f1404a4 100644 (file)
                                $value = sprintf("%d", $value);
                        }
 
-                       if ($pref_name == 'DEFAULT_ARTICLE_LIMIT' && $value == 0) {
-                               $value = 30;
-                       }
-
                        if ($pref_name == 'USER_TIMEZONE' && $value == '') {
                                $value = 'UTC';
                        }
index c04e6a81a246ab3ec4e26f273aef65b335b3448a..92690cfbbdac3988cb18365550f952ad6ee54869 100644 (file)
 
                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);
index 48137a1360eb8d4285c48cfd16d68789d2e9bb47..c1163eab773e1b3d6ac22be6ceebf61de71c6c70 100644 (file)
@@ -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;