--- MPIWGWeb/MPIWGStaff.py 2005/10/18 13:00:04 1.10.2.12 +++ MPIWGWeb/MPIWGStaff.py 2005/10/25 19:58:59 1.10.2.15 @@ -52,7 +52,7 @@ class MPIWGStaff(CatalogAware,ZSQLExtend else: return False - def createNewDBEntry(self,publish_the_data,id,name,vorname,username,title,e_mail,e_mail_p,date_from,date_to,abteilung,heimat_inst,funded_by="",e_mail2="",txt="",txt_p="no"): + def createNewDBEntry(self,publish_the_data,id,name,vorname,username,title,e_mail,e_mail_p,date_from,date_to,abteilung,heimat_inst,funded_by="",e_mail2="",txt="",txt_p="no",stay_at_mpiwg=""): """lege person in der datenbank an""" msg="" #test ob id schon existiert @@ -66,15 +66,15 @@ class MPIWGStaff(CatalogAware,ZSQLExtend if self.ZSQLQuery("select username from personal_www where username='%s' and not publish_the_data='yes'"%username): msg="WARNING:username %s not unique but id=%s added"%(username,id) #eintragen - columnlist="publish_the_data,id,name,vorname,username,title,e_mail,e_mail_p,date_from,date_to,abteilung,heimat_inst,funded_by,e_mail2" - insertTuple=(publish_the_data,id,name,vorname,username,title,e_mail,e_mail_p,date_from,date_to,abteilung,heimat_inst,funded_by,e_mail2) + columnlist="publish_the_data,id,name,vorname,username,title,e_mail,e_mail_p,date_from,date_to,abteilung,heimat_inst,funded_by,e_mail2,stay_at_mpiwg" + insertTuple=(publish_the_data,id,name,vorname,username,title,e_mail,e_mail_p,date_from,date_to,abteilung,heimat_inst,funded_by,e_mail2,stay_at_mpiwg) insert=[] for element in insertTuple: insert.append("'%s'"%element) insertStr=",".join(insert) - queryStr="INSERT INTO personal_www (%s) VALUES (%s)"%(columnlist,insertTuple) + queryStr="INSERT INTO personal_www (%s) VALUES (%s)"%(columnlist,insertStr) self.ZSQLQuery(queryStr) @@ -85,7 +85,7 @@ class MPIWGStaff(CatalogAware,ZSQLExtend return True,msg - def updateDBEntry(self,publish_the_data,date_from,date_to,DBid=None): + 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 +94,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) + date_to=date_to,stay_at_mpiwg=stay_at_mpiwg,position=position) def getPublicationSelectionMode(self):