]> git.nbdom.net Git - nb.git/commitdiff
bin/rss-feedparser
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 24 Jul 2018 21:32:15 +0000 (22:32 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 24 Jul 2018 21:32:15 +0000 (22:32 +0100)
bin/rss-feedparser
lib/php/db/table.php

index cd1a4fb9675dcf6b1539c15acd05d21f1b97044f..8463a1a3ee8f0e8eaa8f05166ded7793abb282ed 100755 (executable)
@@ -45,6 +45,7 @@ def getHeadlines( rss_url ):
 
         # Title
         if 'title' in newsitem:
+            newsitem['title'] = newsitem['title'][:200]
             line.append(newsitem['title'])
         else:
             continue
index abf16be0f2cf6a1e9a63ca90767da1c4003bd1ee..95d21b6ebce920e02eab5507420dabefc439d28e 100644 (file)
@@ -732,13 +732,20 @@ Class Table extends nb {
                        $y = $tot;
                        $prev = -1;
                        $next = 999999;
+                       #$next = $tot + 1;
+                       #debug('zaza');
+                       #$this->debug("x=$x limit=$y prev=$prev next=$next tot=$tot",0);
                }
 
-               if ($prev>=0) $html .= '<span class="prev"><a href="'.$this->url_list('limit',preg_replace('/^0,/','',"$prev,$y")).'">&lt;</a></span>&nbsp;';
+               if ($prev>=0) {
+                       $html .= '<span class="prev"><a href="'.$this->url_list('limit',preg_replace('/^0,/','',"$prev,$y")).'">&lt;</a></span>&nbsp;';
+               }
 
                $html .= '<span class="count">'.($tot ? ($x+1) : 0).' - '.( $tot<($x+$y) ? $tot : ($x+$y) ).' / '.$tot.'</span>';
 
-               if ($next<$tot) $html .= '&nbsp;<span class="next"><a href="'.$this->url_list('limit',"$next,$y").'">&gt;</a></span>';
+               if ($next<$tot) {
+                       $html .= '&nbsp;<span class="next"><a href="'.$this->url_list('limit',"$next,$y").'">&gt;</a></span>';
+               }
 
                return $html;