Diff for /ECHO_content/VLPExtension.py between versions 1.57 and 1.61

version 1.57, 2007/01/08 17:57:23 version 1.61, 2007/07/24 09:11:46
Line 145  def manage_addSendMailForm(self, id, toA Line 145  def manage_addSendMailForm(self, id, toA
   
                   
 class VLP_essay(Folder):  class VLP_essay(Folder):
     """classe für VLP essays"""      """classe fr VLP essays"""
   
     meta_type="VLP_essay"      meta_type="VLP_essay"
   
Line 263  class VLP_essay(Folder): Line 263  class VLP_essay(Folder):
             retstr=url+"?p="+str(int(pagenum)+1)              retstr=url+"?p="+str(int(pagenum)+1)
             return retstr              return retstr
                   
       def lastURL(self,pagenum,url):
           # teste ob performance ok, sonst in variable
           pages=len(self.ZopeFind(self,obj_metatypes=['DTML Document','File'])) 
           
           return url+"?p="+str(pages)
               
     def previousURL(self,pagenum,url):      def previousURL(self,pagenum,url):
                   
         if int(pagenum)-1 > 0:          if int(pagenum)-1 > 0:
Line 364  class VLP_subcollection(ECHO_collection) Line 370  class VLP_subcollection(ECHO_collection)
             sort=self.collectionSort(type)              sort=self.collectionSort(type)
                   
             item = [x for x in self.ZSQLSimpleSearch("""SELECT * FROM vl_literature               item = [x for x in self.ZSQLSimpleSearch("""SELECT * FROM vl_literature 
                                  WHERE volumeid ~ '%s\\M' """%self.getId()                                   WHERE volumeid ~ '%s\\\\M' """%self.getId()
                                  + """ %s AND not referenceType='%s' """%(online,type)                                   + """ %s AND not referenceType='%s' """%(online,type)
                                  + """ORDER BY """ + sort)]                                   + """ORDER BY """ + sort)]
                   
Line 426  class VLP_collection(ECHO_collection): Line 432  class VLP_collection(ECHO_collection):
   
     def generateSubCollections(self,errorsTXT=""):      def generateSubCollections(self,errorsTXT=""):
             """erzeuge subcollectionen"""              """erzeuge subcollectionen"""
             founds=self.ZSQLSimpleSearch("select * from vl_literature where referencetype in ('(Edited Book)','(Book)','(Collection)','(JournalVolume)','(Generic Container)'")              founds=self.ZSQLSimpleSearch("select * from vl_literature where referencetype in ('(Edited Book)','(Book)','(Collection)','(JournalVolume)','(Generic Container)')")
                           
             self.REQUEST.RESPONSE.write("<h2>Create Subcollections</h2>\n")              self.REQUEST.RESPONSE.write("<h2>Create Subcollections</h2>\n")
             for found in founds:              for found in founds:
Line 505  class VLP_collection(ECHO_collection): Line 511  class VLP_collection(ECHO_collection):
                 except:                  except:
                         error=sys.exc_info()[0:2]                          error=sys.exc_info()[0:2]
                         RESPONSE.write("<p>(ERROR (%s): %s %s)</p>\n"%(fileName,error[0],error[1]))                          RESPONSE.write("<p>(ERROR (%s): %s %s)</p>\n"%(fileName,error[0],error[1]))
                         errorsTXT+="<p>File not created:%s  "+"(ERROR: %s %s)</p>"%error                          errorsTXT+="<p>File not created:%s  (ERROR: %s %s)</p>"%(fileName,error[0],error[1])
                                                                   
         errorsTXT+=self.generateSubCollections()          errorsTXT+=self.generateSubCollections()
         errorsTXT+="/n"          errorsTXT+="\n"
         RESPONSE.write(errorsTXT)          RESPONSE.write(errorsTXT)
         if RESPONSE is not None:          if RESPONSE is not None:
             RESPONSE.redirect('manage_main')              RESPONSE.redirect('manage_main')
Line 756  class VLP_resource(ECHO_resource,Cacheab Line 762  class VLP_resource(ECHO_resource,Cacheab
     def dir2index(self):      def dir2index(self):
         """dir to index"""          """dir to index"""
   
         excludeNames=['Icon']          excludeNames=['Icon',':2eD']
                                   
                   
         def calculateName(str):          def calculateName(str):

Removed from v.1.57  
changed lines
  Added in v.1.61


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