changeset 147:48460e925a8c

Fix feed getter.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 15 Jun 2013 01:06:10 +0300
parents 7106dd8db4de
children 2f0c823386b0
files get_feeds.tcl
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/get_feeds.tcl	Wed Jun 05 16:00:16 2013 +0300
+++ b/get_feeds.tcl	Sat Jun 15 01:06:10 2013 +0300
@@ -49,7 +49,12 @@
 
 proc add_entry {uname uprefix uurl utitle} {
   global currclock feeds_db nitems
-  set utest "$uprefix[convert_ent $uurl]"
+  set utmp [convert_ent $uurl]
+  if {[string match "http://*" $utmp] || [string match "https://*" $utmp]} {
+    set utest "$utmp"
+  } else {
+    set utest "$uprefix$utmp"
+  }
 
   set usql "SELECT title FROM feeds WHERE url='[escape $utest]' AND feed='[escape $uname]'"
   if {![feeds_db exists $usql]} {