--- versionedFile/versionedFile.py 2004/07/08 15:55:27 1.7 +++ versionedFile/versionedFile.py 2004/07/08 16:34:09 1.10 @@ -160,7 +160,7 @@ class versionedFileObject(File): """download and lock""" - self.content_type="octet/stream" + self.content_type="application/octet-stream" self.REQUEST.RESPONSE.redirect(self.absolute_url()) def downloadLocked(self): @@ -173,7 +173,7 @@ class versionedFileObject(File): return "cannot be locked because is already locked by %s"%self.lockedBy self.aq_parent.lockedBy=self.REQUEST['AUTHENTICATED_USER'] - self.content_type="octet/stream" + self.content_type="application/octet-stream" self.REQUEST.RESPONSE.redirect(self.absolute_url()) def setVersionNumber(self,versionNumber): @@ -298,7 +298,7 @@ class versionedFile(Folder): ret.sort(sortv) return ret - + security.declareProtected('AUTHENTICATED_USER','unlock') def unlock(self,RESPONSE): """unlock""" if str(self.lockedBy) in [str(self.REQUEST['AUTHENTICATED_USER'])]: @@ -307,7 +307,7 @@ class versionedFile(Folder): else: return "Sorry, not locked by you! (%s,%s)"%(self.lockedBy,self.REQUEST['AUTHENTICATED_USER']) - security= ClassSecurityInfo() + security.declareProtected('AUTHENTICATED_USER','addVersionedFileObjectForm') def addVersionedFileObjectForm(self): @@ -342,7 +342,7 @@ class versionedFile(Folder): def download(self): """download and lock""" - self.getLastVersion().content_type="octet/stream" + self.getLastVersion().content_type="application/octet-stream" self.REQUEST.RESPONSE.redirect(self.REQUEST['URL1']+'/'+self.getId()+'/'+self.getLastVersion().getId()) def downloadLocked(self): @@ -352,7 +352,7 @@ class versionedFile(Folder): if not self.lockedBy=="": return "cannot be locked because is already locked by %s"%self.lockedBy self.lockedBy=self.REQUEST['AUTHENTICATED_USER'] - self.getLastVersion().content_type="octet/stream" + self.getLastVersion().content_type="application/octet-stream" self.REQUEST.RESPONSE.redirect(self.REQUEST['URL1']+'/'+self.getId()+'/'+self.getLastVersion().getId()) def manage_addVersionedFileForm(self):