Diff for /MPIWGWeb/MPIWGStaff.py between versions 1.10.2.11 and 1.10.2.15

version 1.10.2.11, 2005/10/17 20:37:05 version 1.10.2.15, 2005/10/25 19:58:59
Line 52  class MPIWGStaff(CatalogAware,ZSQLExtend Line 52  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"):      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"""          """lege person in der datenbank an"""
         msg=""          msg=""
         #test ob id schon existiert          #test ob id schon existiert
Line 66  class MPIWGStaff(CatalogAware,ZSQLExtend Line 66  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"          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)          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=[]          insert=[]
         for element in insertTuple:          for element in insertTuple:
             insert.append("'%s'"%element)              insert.append("'%s'"%element)
                   
         insertStr=",".join(insert)          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)          self.ZSQLQuery(queryStr)
                   
Line 85  class MPIWGStaff(CatalogAware,ZSQLExtend Line 85  class MPIWGStaff(CatalogAware,ZSQLExtend
                   
         return True,msg          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"""          """zpddatedb"""
         if not DBid:          if not DBid:
             DBid=self.getDBId()              DBid=self.getDBId()
Line 94  class MPIWGStaff(CatalogAware,ZSQLExtend Line 94  class MPIWGStaff(CatalogAware,ZSQLExtend
   
         self.ZSQLChange(_table="personal_www",_identify="id=%s"%DBid,publish_the_data=publish_the_data,          self.ZSQLChange(_table="personal_www",_identify="id=%s"%DBid,publish_the_data=publish_the_data,
                                    date_from=date_from,                                     date_from=date_from,
                                    date_to=date_to)                                     date_to=date_to,stay_at_mpiwg=stay_at_mpiwg,position=position)
                                       
                       
     def getPublicationSelectionMode(self):      def getPublicationSelectionMode(self):
Line 239  class MPIWGStaff(CatalogAware,ZSQLExtend Line 239  class MPIWGStaff(CatalogAware,ZSQLExtend
   
     mainEditFile=PageTemplateFile(os.path.join(package_home(globals()),'zpt','editMPIWGStaff_main.zpt'))      mainEditFile=PageTemplateFile(os.path.join(package_home(globals()),'zpt','editMPIWGStaff_main.zpt'))
   
       def getPathStyle(self, path, selected, style=""):
           """returns a string with the given style + 'sel' if path == selected."""
   
           if path == selected:
               return style + 'sel'
           else:
               return style    
   
     security.declareProtected('View management screens','changeResearch')      security.declareProtected('View management screens','changeResearch')
     def changeResearch(self,noredirect=None):      def changeResearch(self,noredirect=None):
         """change the research entries"""          """change the research entries"""

Removed from v.1.10.2.11  
changed lines
  Added in v.1.10.2.15


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