From: Andrew Dolgov Date: Wed, 21 Dec 2005 18:45:18 +0000 (+0100) Subject: fix DEFAULT_ARTICLE_LIMIT handling X-Git-Tag: 1.1.1~14 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=59b7764387a7e47ad4526ebdcf71a3cf2da75a2d;p=tt-rss.git fix DEFAULT_ARTICLE_LIMIT handling --- diff --git a/tt-rss.php b/tt-rss.php index b225a1ce..f0203e55 100644 --- a/tt-rss.php +++ b/tt-rss.php @@ -169,16 +169,17 @@ $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 "