Author: dmeyer
Date: Wed Nov 29 14:06:18 2006
New Revision: 2115

Modified:
   trunk/beacon/src/item.py

Log:
support item with url in db

Modified: trunk/beacon/src/item.py
==============================================================================
--- trunk/beacon/src/item.py    (original)
+++ trunk/beacon/src/item.py    Wed Nov 29 14:06:18 2006
@@ -293,11 +293,14 @@
 
 
 def create_item(data, parent):
-    url = parent.url
-    if data['name']:
-        if parent.url.endswith('/'):
-            url = parent.url + data['name']
-        else:
-            url = parent.url + '/' + data['name']
+    if 'url' in data:
+        url = data['url']
+    else:
+        url = parent.url
+        if data['name']:
+            if parent.url.endswith('/'):
+                url = parent.url + data['name']
+            else:
+                url = parent.url + '/' + data['name']
     return Item((data['type'], data['id']), url, data, parent,
                 parent._beacon_media)

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to