]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix DEFAULT_ARTICLE_LIMIT handling
authorAndrew Dolgov <fox@bah.spb.su>
Wed, 21 Dec 2005 18:45:18 +0000 (19:45 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Wed, 21 Dec 2005 18:45:18 +0000 (19:45 +0100)
tt-rss.php

index b225a1ceec0bd1de75196358b3c1cbd5e03eddce..f0203e55635d175496ff569afd9ebd70c5e39dc7 100644 (file)
                        
                        $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
 
-                       print $def_art_limit;
-       
-                       if ($def_art_limit >= 0) {
+                       if ($def_art_limit >= 0 && !array_key_exists($def_art_limit, $limits)) {
                                $limits[$def_art_limit] = $def_art_limit; 
                        }
-                       
-                       asort($limits);
 
+                       asort($limits);
                        array_push($limits, 0);
 
+                       if (!$def_art_limit) {
+                               $def_art_limit = 30;
+                       }
+
                        foreach ($limits as $key) {
                                print "<option";
                                if ($key == $def_art_limit) { print " selected"; }