Diff for /documentViewer/documentViewer.py between versions 1.15 and 1.16

version 1.15, 2006/07/14 16:22:36 version 1.16, 2006/07/18 16:59:57
Line 284  class documentViewer(Folder): Line 284  class documentViewer(Folder):
        if dom is None:         if dom is None:
            dom = self.getIndexMeta(url)             dom = self.getIndexMeta(url)
                 
          archivePath = None
          archiveName = None
   
        archiveNames=dom.xpath("//resource/name")         archiveNames=dom.xpath("//resource/name")
        if archiveNames and (len(archiveNames)>0):         if archiveNames and (len(archiveNames)>0):
            archiveName=getTextFromNode(archiveNames[0])             archiveName=getTextFromNode(archiveNames[0])
          else:
              zLOG.LOG("documentViewer (getdocinfofromtexttool)", zLOG.WARNING,"resource/name missing in: %s"%(url))
                 
        archivePaths=dom.xpath("//resource/archive-path")         archivePaths=dom.xpath("//resource/archive-path")
        if archivePaths and (len(archivePaths)>0):         if archivePaths and (len(archivePaths)>0):
Line 294  class documentViewer(Folder): Line 299  class documentViewer(Folder):
            # clean up archive path             # clean up archive path
            if archivePath[0] != '/':             if archivePath[0] != '/':
                archivePath = '/' + archivePath                 archivePath = '/' + archivePath
            if not archivePath.endswith(archiveName):             if archiveName and (not archivePath.endswith(archiveName)):
                archivePath += "/" + archiveName                 archivePath += "/" + archiveName
        else:         else:
            archivePath=None             # try to get archive-path from url
              zLOG.LOG("documentViewer (getdocinfofromtexttool)", zLOG.WARNING,"resource/archive-path missing in: %s"%(url))
              if (not url.startswith('http')):
                  archivePath = url.replace('index.meta', '')
                  
          if archivePath is None:
              # we balk without archive-path
              raise IOError("Missing archive-path (for text-tool) in %s"%(url))
                 
        imageDirs=dom.xpath("//texttool/image")         imageDirs=dom.xpath("//texttool/image")
        if imageDirs and (len(imageDirs)>0):         if imageDirs and (len(imageDirs)>0):

Removed from v.1.15  
changed lines
  Added in v.1.16


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>