--- MPIWGWeb/MPIWGStaff.py 2005/10/24 22:56:22 1.10.2.14 +++ MPIWGWeb/MPIWGStaff.py 2005/11/11 15:02:27 1.10.2.16 @@ -15,6 +15,8 @@ from Products.PythonScripts.standard imp from types import * from AccessControl import ClassSecurityInfo +import zLOG + departmentList="Renn\nRheinberger\nDaston\nKlein\nSibum\nIT\nInstitut\nBibliothek" @@ -85,7 +87,7 @@ class MPIWGStaff(CatalogAware,ZSQLExtend return True,msg - def updateDBEntry(self,publish_the_data,date_from,date_to,DBid=None,stay_at_mpiwg=""): + def updateDBEntry(self,publish_the_data,date_from,date_to,DBid=None,stay_at_mpiwg="",position=""): """zpddatedb""" if not DBid: DBid=self.getDBId() @@ -94,7 +96,7 @@ class MPIWGStaff(CatalogAware,ZSQLExtend self.ZSQLChange(_table="personal_www",_identify="id=%s"%DBid,publish_the_data=publish_the_data, date_from=date_from, - date_to=date_to,stay_at_mpiwg=stay_at_mpiwg) + date_to=date_to,stay_at_mpiwg=stay_at_mpiwg,position=position) def getPublicationSelectionMode(self): @@ -130,12 +132,20 @@ class MPIWGStaff(CatalogAware,ZSQLExtend def getImageFolder(self): """getImageFolder""" - return self.getPhysicalRoot().www_neu.images.staff_images - + #TODO: make place of staff image folder configurable + + try: + return self.getPhysicalRoot().www_neu.images.staff_images + except: + zLOG.LOG("MPWIG STAFF", zLOG.ERROR, "image folder not found:"," has to be add /www_neu/staff_images") + return None + def getImageObj(self): """getImage""" imageFolder=self.getImageFolder() + if not imageFolder: return None + image=getattr(imageFolder,self.getId(),None) if not image: @@ -359,7 +369,7 @@ class MPIWGStaff(CatalogAware,ZSQLExtend return pt() else: - self.ZSQLChange(argv,_table="personal_www",_identify="<%s"%self.getDBId(),USE_FORM="yes") + self.ZSQLChange(argv,_table="personal_www",_identify="id=%s"%self.getDBId(),USE_FORM="yes") if RESPONSE: RESPONSE.redirect("editMainData")