--- ImageArchive/ImageArchive.py 2007/01/31 14:24:17 1.103
+++ ImageArchive/ImageArchive.py 2008/08/15 14:10:23 1.104
@@ -1,3 +1,5 @@
+"""version 1 des Imageservers, wird ersetzt durch version2"""
+
genericServerPath="http://www.mpiwg-berlin.mpg.de/zogilib_images" #can be changed with main config
@@ -34,7 +36,10 @@ def logger(txt,method,txt2):
"""logging"""
logging.info(txt+ txt2)
-
+def logTime(msg=""):
+ """log the time"""
+ logging.info("%s %s"%(msg,time.clock()))
+
from AccessControl import ClassSecurityInfo, getSecurityManager
@@ -316,7 +321,7 @@ class ImageDigilib(Folder,Persistent,Imp
def isAccessible(self):
"""gives true if obejct is accessible taking the rights of the user into account"""
-
+ logTemp("isaccessible")
#TODO: implement rights, currently true if external and false if internal, and true if user has role authenticated
username=self.REQUEST['AUTHENTICATED_USER']
@@ -637,7 +642,8 @@ class ImageDigilib(Folder,Persistent,Imp
- self.REQUEST.SESSION['string']=""% path
+ imageString=""% path
+ self.REQUEST.SESSION['string']=imageString
if url:
return ""% path
else:
@@ -647,7 +653,7 @@ class ImageDigilib(Folder,Persistent,Imp
return getattr(self,overview[0][0])()
else:
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','thumbMD.zpt')).__of__(self)
- return pt()
+ return pt(imageString=imageString)
def image(self,dw=None,dh=None):
@@ -1685,7 +1691,8 @@ class ImageCollection(OrderedFolder, Per
showall=self.REQUEST.SESSION.get('showall', 'No')
if showall=='yes':
rows=int(idsnumber/cols)+1
-
+
+ logTime("getColTimesRow finished")
return (cols,rows)
@@ -1728,13 +1735,15 @@ class ImageCollection(OrderedFolder, Per
self.REQUEST.SESSION['ids']=ids
number=int(len(ids)/numberOfColumns)+1
-
+
+ logTime("show_thumbs_rows finished (%s)"%str(number))
return range(number+1)
def show_thumbs_columns(self,row,numberOfColumns):
"""Ausgabe einer Liste der Reihe"""
ids=self.REQUEST.SESSION['ids']
max=len(ids)
+ logTime("show_thumb_columns finishes row: %s"%row)
if (row*numberOfColumns)