]> git.nbdom.net Git - nb.git/commitdiff
www/dbq/dbq.php
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 27 Jun 2018 03:18:10 +0000 (04:18 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 27 Jun 2018 03:18:10 +0000 (04:18 +0100)
bin/rss-feedparser
www/dbq/dbq.php

index 78667a09fd709eaee5d4bb137df7ff27e090fd2d..81e72561eaae2e310d49e759fc921da79a1360e6 100755 (executable)
@@ -19,7 +19,8 @@ def getHeadlines( rss_url ):
 # NB 22.06.18     for key in feed['feed']:
 # NB 22.06.18         print(key)
     #print(feed['feed']['title'])
-    #print(feed['items'])
+    #print(feed['items'][0])
+    #return
 # NB 25.06.18     for newsitem in feed['items']:
 # NB 25.06.18         print('>',feed['feed']['title'])
 # NB 25.06.18         for k,v in newsitem.items():
@@ -34,7 +35,10 @@ def getHeadlines( rss_url ):
         #print(newsitem)
 
         # Link
-        line.append(newsitem['link'])
+        if 'href' in newsitem['link']:
+            line.append(newsitem['link']['href'])
+        else:
+            line.append(newsitem['link'])
 
         # Channel Link
         line.append(re.sub('/*$','',feed['feed']['link']))
index f01ee920f7378b686a1c9c5546734884314a1fb2..94c0dbf4e6f111db44fc7c50ce91b003bf466809 100644 (file)
@@ -519,7 +519,8 @@ class DbQ extends nb {
 
                ];
                $this->db->is_html = $ropt['is_html'];
-               $this->db->limit = $ropt['is_html'] ? $this->limit() : null;
+# NB 26.06.18          $this->db->limit = $ropt['is_html'] ? $this->limit() : null;
+               $this->db->limit = $this->limit();
                if (!empty($this->_nopage)) {
                        $this->table->show_url_sort = false;
                }
@@ -579,11 +580,11 @@ class DbQ extends nb {
                return $array;
        }
 
-       public static function uri_add_referer($rm) {
+       private function uri_add_referer($rm) {
 
 
                if (isset($_SERVER['REQUEST_URI'])) {
-                       $rm .= (strpos($rm,'?') ? '' : '?') . 'referer=' . urlencode($_SERVER['REQUEST_URI']);
+                       $rm .= (strpos($rm,'?') ? '' : '?') . 'referer=' . urlencode($this->base.$_SERVER['REQUEST_URI']);
                }
                return $rm;
        }