--- MPIWGWeb/MPIWGStaff.py 2007/04/18 10:03:13 1.10.2.33 +++ MPIWGWeb/MPIWGStaff.py 2007/06/26 11:04:16 1.10.2.36 @@ -86,7 +86,7 @@ class MPIWGStaff(CatalogAware,ZSQLExtend return self.key.lower() #fuer alt faelle ohne key - return (self.firstName+'_'+self.lastName).lower() + return (self.firstName+'_'+self.lastName).lower().replace(' ','') def getConnectionObj(self):#ueberschreibe connection id methode @@ -95,7 +95,7 @@ class MPIWGStaff(CatalogAware,ZSQLExtend def isPublished(self): """gib publications status aus der datenbank aus""" key=self.getKey() - query="select count(publish_the_data) from personal_www where key='%s' and publish_the_data='yes'"%key + query="select count(publish_the_data) from personal_www where lower(key)='%s' and publish_the_data='yes'"%key res = self.ZSQLQuery(query) @@ -266,11 +266,13 @@ class MPIWGStaff(CatalogAware,ZSQLExtend return pt() security.declareProtected('View management screens','changeMPIWGStaff') - def changeMPIWGStaff(self,lastName,firstName,RESPONSE=None): + def changeMPIWGStaff(self,lastName,firstName,key=None,RESPONSE=None): """change it""" self.title="%s, %s"%(lastName,firstName) self.lastName=lastName self.firstName=firstName + if key: + self.key = key if RESPONSE is not None: RESPONSE.redirect('manage_main') @@ -479,7 +481,7 @@ class MPIWGStaff(CatalogAware,ZSQLExtend if mode=="year": return "year DESC" else: - return "mode" + return mode def integer(self,value): try: