--- ECHO_content/ECHO_collection.py 2005/01/21 16:28:58 1.204 +++ ECHO_content/ECHO_collection.py 2005/01/21 17:32:09 1.205 @@ -1794,29 +1794,32 @@ class ECHO_collection(Folder, Persistent except: return "" - def getCollectionTreeXML(self): + def getCollectionTreeXML(self,pwstr=None): """Tree as XML""" - def addPassWd(str): + def addPassWd(str,pwstr=None): """adds a user/passwd to an url""" - txt2=re.sub(r"(http://)(.*?)","\g<1>www:3333@\g<2>",str) + if pwstr: + txt2=re.sub(r"(http://)(.*?)","\g<1>%s@\g<2>"%pwstr,str) + else: + txt2=re.sub(r"(http://)(.*?)","\g<1>www:3333@\g<2>",str) return txt2 - def getCollection(object,depth=0): + def getCollection(object,depth=0,pwstr=None): depth+=1 collections="" for entry in object.__dict__.keys(): element=getattr(object,entry) try: if element.meta_type in ["ECHO_collection","ECHO_group"]: - collections+="" + collections+="" collections+=getCollection(element,depth)+"\n" except: """nothing""" return collections ret="""""" - return ret+""+getCollection(self)+"" + return ret+""+getCollection(self,pwstr=pwstr)+"" def createAllJSAreas(self): """create area calls for JavaScript"""