--- MPIWGWeb/MPIWGStaff.py 2005/11/11 15:02:27 1.10.2.16 +++ MPIWGWeb/MPIWGStaff.py 2005/11/11 19:42:36 1.10.2.17 @@ -54,7 +54,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",stay_at_mpiwg=""): + def createNewDBEntry(self,publish_the_data,id,name,vorname,username,title,position,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 @@ -68,8 +68,8 @@ 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,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) + columnlist="publish_the_data,id,name,vorname,username,title,position,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,position,e_mail,e_mail_p,date_from,date_to,abteilung,heimat_inst,funded_by,e_mail2,stay_at_mpiwg) insert=[] for element in insertTuple: @@ -77,12 +77,13 @@ class MPIWGStaff(CatalogAware,ZSQLExtend insertStr=",".join(insert) queryStr="INSERT INTO personal_www (%s) VALUES (%s)"%(columnlist,insertStr) - + self.ZSQLQuery("SET DATESTYLE TO 'German'") self.ZSQLQuery(queryStr) - + #currentwork if not (txt==""): queryStr="INSERT INTO current_work (id_main,current,publish) VALUES ('%s','%s','%s')"%(id,txt,txt_p) + self.ZSQLQuery(queryStr) return True,msg