version 1.105, 2008/08/18 13:27:42
|
version 1.108, 2010/06/15 14:08:12
|
Line 326 class ImageDigilib(Folder,Persistent,Imp
|
Line 326 class ImageDigilib(Folder,Persistent,Imp
|
|
|
def isAccessible(self): |
def isAccessible(self): |
"""gives true if obejct is accessible taking the rights of the user into account""" |
"""gives true if obejct is accessible taking the rights of the user into account""" |
logTemp("isaccessible") |
logTime("isaccessible") |
#TODO: implement rights, currently true if external and false if internal, and true if user has role authenticated |
#TODO: implement rights, currently true if external and false if internal, and true if user has role authenticated |
|
|
username=self.REQUEST['AUTHENTICATED_USER'] |
username=self.REQUEST['AUTHENTICATED_USER'] |
Line 602 class ImageDigilib(Folder,Persistent,Imp
|
Line 602 class ImageDigilib(Folder,Persistent,Imp
|
newImagePath=oldNameBase+uploadFileExt |
newImagePath=oldNameBase+uploadFileExt |
|
|
f=open(newImagePath,"w") # if we wanted to have filename=id we should do it here! |
f=open(newImagePath,"w") # if we wanted to have filename=id we should do it here! |
|
logging.error("saving:"+newImagePath) |
f.write(filedata) |
f.write(filedata) |
f.close() |
f.close() |
try: |
try: |
Line 615 class ImageDigilib(Folder,Persistent,Imp
|
Line 616 class ImageDigilib(Folder,Persistent,Imp
|
#scale standard |
#scale standard |
|
|
self.scaleWorkingVersions() |
self.scaleWorkingVersions() |
self.scaleToJpg() |
#self.scaleToJpg() |
if _rename: |
if _rename: |
self.renameImage(_fileupload.filename) |
self.renameImage(_fileupload.filename) |
|
|
Line 1291 class ImageCollection(OrderedFolder, Per
|
Line 1292 class ImageCollection(OrderedFolder, Per
|
if os.path.isdir(os.path.join(self.getImageStoragePath(),file)): |
if os.path.isdir(os.path.join(self.getImageStoragePath(),file)): |
ImageStoragePath=os.path.join(self.getImageStoragePath(),file) |
ImageStoragePath=os.path.join(self.getImageStoragePath(),file) |
imageViewerPath=os.path.join(self.ImageViewerPath,file) |
imageViewerPath=os.path.join(self.ImageViewerPath,file) |
manage_AddImageCollection(self,file,file,self.getImageStoragePath(),imageViewerPath,self.defaultMetaString) |
#manage_AddImageCollection(self,file,file,self.getImageStoragePath(),imageViewerPath,self.defaultMetaString) |
|
manage_AddImageCollection(self,file,file,imageViewerPath,self.defaultMetaString,self.destBasis,self.srcBasis,self.serverPath) |
obj=getattr(self,file) |
obj=getattr(self,file) |
obj.ImportStructure() |
obj.ImportStructure() |
else: |
else: |