--- MPIWGWeb/MPIWGProjects.py 2005/06/05 22:06:35 1.47.2.9 +++ MPIWGWeb/MPIWGProjects.py 2005/06/06 14:51:47 1.47.2.10 @@ -418,14 +418,19 @@ class MPIWGRoot(ZSQLExtendFolder): def getProjectsByFieldContent(self,fieldName,fieldContentsEntry): """gib alle Projekte aus mit Value von field mit fieldName enthält ein Element der Liste fieldContents""" - if type(fieldContentsEntry) is StringType: + def sort(x,y): + return cmp(x.WEB_title[0],y.WEB_title[0]) + + if type(fieldContentsEntry) is StringType: fieldContents=[fieldContentsEntry] else: fieldContents=fieldContentsEntry projects=self.ProjectCatalog({fieldName:string.join(fieldContents,' OR')}) #print projects - return projects + ret=[x for x in projects] + ret.sort(sort) + return ret def changeMPIWGRootForm(self): """edit""" @@ -652,35 +657,35 @@ class MPIWGRoot(ZSQLExtendFolder): if (element[0]>actualDepth): #fuege soviele ul ein wie unterschied in tiefe if element[0]==1: - ret+="""
""") if len(splitted)>1: tmp=splitted[1].split("
") - self.REQUEST.SESSION['image']=tmp[0].split("\"")[1].encode('utf-8') + #return repr(splitted[1]) + try: + self.REQUEST.SESSION['image']=tmp[0].split("\"")[1].encode('utf-8') + except: + self.REQUEST.SESSION['image']=tmp[0].split("src=")[1].split(" ")[0].encode('utf-8') split2="".join(tmp[1:]) text3=splitted[0]+split2