--- nfo/projects/netfraggle/bin/fraggleEngine.py 2004/09/17 09:42:30 1.12 +++ nfo/projects/netfraggle/bin/fraggleEngine.py 2004/09/21 18:07:09 1.13 @@ -5,13 +5,16 @@ # Author: joko # # Created: 2004/30/08 -# RCS-ID: $Id: fraggleEngine.py,v 1.12 2004/09/17 09:42:30 xabbu Exp $ +# RCS-ID: $Id: fraggleEngine.py,v 1.13 2004/09/21 18:07:09 xabbu Exp $ # Copyright: (c) 2004 netfrag.org # Licence: GPL #----------------------------------------------------------------------------- #----------------------------------------------------------------------------- # $Log: fraggleEngine.py,v $ +# Revision 1.13 2004/09/21 18:07:09 xabbu +# + added functions listItems and getContent +# # Revision 1.12 2004/09/17 09:42:30 xabbu # U function listItems() places a query to the server now and returns its results # @@ -97,9 +100,17 @@ return self.topics[id] def listItems(self,contentkey): - result = self.queryCms(str("GET creator_id, language_id, description FROM contents WITH type "+contentkey)) + print contentkey + result = self.queryCms(str("GET creator_id, language_id, description, id FROM contents WITH type "+contentkey)) + return result + + def getContent(self,contentkey): + query = str("GET content, creator_id, description, id FROM contents WITH id "+contentkey) + result = self.queryCms(query) + print query return result + def queryCms(self,nqlquery): from xmlrpclib import Server,Error