# HG changeset patch # User dwinter # Date 1371215075 -7200 # Node ID a8d5ba6729f373835caf46cc66f220c90efa6b48 # Parent 2802941bbe2def3e791ded9ce0b5d2ccb0e9723b bug in delete entries fixes diff -r 2802941bbe2d -r a8d5ba6729f3 MPIWGRoot.py --- a/MPIWGRoot.py Thu Jun 13 18:28:58 2013 +0200 +++ b/MPIWGRoot.py Fri Jun 14 15:04:35 2013 +0200 @@ -517,19 +517,19 @@ splitted = ident.split(":") if len(splitted)!=2: logging.debug("getBookLinkFromID: %s not a valid book id, should be MPIWG-Book:XXXX"%ident) - return + return "" books = getattr(self,'books',None) if books is None: logging.debug("getBookLinkFromID: cannot find books page folder") - return + return "" bookobj = getattr(books,splitted[1],None) if bookobj is None: logging.debug("getBookLinkFromID: %s not a valid book id"%ident) - return + return "" return "books/"+splitted[1] diff -r 2802941bbe2d -r a8d5ba6729f3 MPIWGStaff.py --- a/MPIWGStaff.py Thu Jun 13 18:28:58 2013 +0200 +++ b/MPIWGStaff.py Fri Jun 14 15:04:35 2013 +0200 @@ -682,15 +682,24 @@ - + security.declareProtected('View management screens','deleteField') def deleteField(self,REQUEST): """delete entry""" + CHANGEABLE=['talks','taching','pubmanbiblio'] + + table = REQUEST.form.get('table',None); oid = REQUEST.form.get('oid',None); + + if not table in CHANGEABLE: + return + if oid is None: + oid = REQUEST.form.get('key',None); + if table is None or oid is None: return @@ -754,7 +763,8 @@ pt=PageTemplateFile('zpt/staff/pubman/show_publications.zpt', globals()).__of__(self) return pt(member=self.content) - + + security.declareProtected('View management screens','addPublicationsFromPubman') def addPublicationsFromPubman(self,REQUEST): """addPublications from pubman"""