Diff for /MPIWGWeb/MPIWGStaff.py between versions 1.10.2.16 and 1.10.2.20

version 1.10.2.16, 2005/11/11 15:02:27 version 1.10.2.20, 2005/11/25 12:14:46
Line 54  class MPIWGStaff(CatalogAware,ZSQLExtend Line 54  class MPIWGStaff(CatalogAware,ZSQLExtend
         else:          else:
             return False              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"""          """lege person in der datenbank an"""
         msg=""          msg=""
         #test ob id schon existiert          #test ob id schon existiert
Line 68  class MPIWGStaff(CatalogAware,ZSQLExtend Line 68  class MPIWGStaff(CatalogAware,ZSQLExtend
         if self.ZSQLQuery("select username from personal_www where username='%s' and not publish_the_data='yes'"%username):          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)              msg="WARNING:username %s not unique but id=%s added"%(username,id)
         #eintragen          #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"          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,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=[]          insert=[]
         for element in insertTuple:          for element in insertTuple:
Line 77  class MPIWGStaff(CatalogAware,ZSQLExtend Line 77  class MPIWGStaff(CatalogAware,ZSQLExtend
                   
         insertStr=",".join(insert)          insertStr=",".join(insert)
         queryStr="INSERT INTO personal_www (%s) VALUES (%s)"%(columnlist,insertStr)          queryStr="INSERT INTO personal_www (%s) VALUES (%s)"%(columnlist,insertStr)
                   self.ZSQLQuery("SET DATESTYLE TO 'German'")
         self.ZSQLQuery(queryStr)          self.ZSQLQuery(queryStr)
                   
         #currentwork          #currentwork
         if not (txt==""):          if not (txt==""):
             queryStr="INSERT INTO current_work (id_main,current,publish) VALUES ('%s','%s','%s')"%(id,txt,txt_p)              queryStr="INSERT INTO current_work (id_main,current,publish) VALUES ('%s','%s','%s')"%(id,txt,txt_p)
   
             self.ZSQLQuery(queryStr)              self.ZSQLQuery(queryStr)
                   
         return True,msg          return True,msg
Line 313  class MPIWGStaff(CatalogAware,ZSQLExtend Line 314  class MPIWGStaff(CatalogAware,ZSQLExtend
     def editCV(self,cv=None,oid=None,RESPONSE=None):      def editCV(self,cv=None,oid=None,RESPONSE=None):
          """edit Cv"""           """edit Cv"""
   
          if (not cv):           if (not oid):
              pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','editCV.zpt')).__of__(self)               pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','editCV.zpt')).__of__(self)
              return pt()               return pt()
                   
          query="UPDATE personal_www SET cv ='%s' WHERE oid='%s'"           query="UPDATE personal_www SET cv =%s WHERE oid='%s'"
   
          self.ZSQLQuery(query%(cv,oid))           self.ZSQLQuery(query%(self.ZSQLQuote(cv),oid))
                   
          if RESPONSE:           if RESPONSE:
             RESPONSE.redirect("editCV")              RESPONSE.redirect("editCV")
Line 328  class MPIWGStaff(CatalogAware,ZSQLExtend Line 329  class MPIWGStaff(CatalogAware,ZSQLExtend
     def editAwards(self,awards=None,oid=None,RESPONSE=None):      def editAwards(self,awards=None,oid=None,RESPONSE=None):
          """edit a awards"""           """edit a awards"""
   
          if (not awards):           if (not oid):
              pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','editAwards.zpt')).__of__(self)               pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','editAwards.zpt')).__of__(self)
              return pt()               return pt()
                   
          query="UPDATE personal_www SET awards ='%s' WHERE oid='%s'"           query="UPDATE personal_www SET awards =%s WHERE oid='%s'"
   
          self.ZSQLQuery(query%(awards,oid))           self.ZSQLQuery(query%(self.ZSQLQuote(awards),oid))
                   
          if RESPONSE:           if RESPONSE:
             RESPONSE.redirect("editAwards")              RESPONSE.redirect("editAwards")
Line 476  class MPIWGStaff(CatalogAware,ZSQLExtend Line 477  class MPIWGStaff(CatalogAware,ZSQLExtend
             query="INSERT INTO %s " % "publications"              query="INSERT INTO %s " % "publications"
             query+="(id_main,id_institutsbibliographie,publish) "              query+="(id_main,id_institutsbibliographie,publish) "
             query+="VALUES ('%s','%s','yes')" %(sql_quote(self.getDBId()),sql_quote(bibId))              query+="VALUES ('%s','%s','yes')" %(sql_quote(self.getDBId()),sql_quote(bibId))
             print "ADD",query              
             #self.ZSQLAdd(_table="publications",id_institutsbibliographie=bibId,id_main=self.getDBId(),publish='yes')              #self.ZSQLAdd(_table="publications",id_institutsbibliographie=bibId,id_main=self.getDBId(),publish='yes')
             self.ZSQLQuery(query)              self.ZSQLQuery(query)
             

Removed from v.1.10.2.16  
changed lines
  Added in v.1.10.2.20


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>