--- ECHO_content/ECHO_collection.py 2005/01/21 16:28:58 1.204 +++ ECHO_content/ECHO_collection.py 2005/01/23 16:45:01 1.206 @@ -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""" @@ -2370,6 +2373,8 @@ class ECHO_root(Folder,Persistent,Implic def checkResource(self,id): """checks if a resource is in the tree, gives back none or list of resources""" + splitted=id.split("/") + id=splitted[len(splitted)-1] if hasattr(self,"_v_checkResource") and self._v_checkResource.has_key(id): #existiert ein cache und id ist bereits drin? return self._v_checkResource[id]