You are not logged in Log in Join
You are here: Home » Members » ivo » Ivo's patches » dtml_in_patch_no1

Log in
Name

Password

 
 
*** Zope-2.3.2-orig/lib/python/DocumentTemplate/DT_In.py	Fri Apr 13 21:30:38 2001
--- Zope-2.3.2-src/lib/python/DocumentTemplate/DT_In.py	Tue May 29 19:52:36 2001
***************
*** 583,611 ****
                  for index in range(first,end):
                      # preset
                      kw['previous-sequence']= 0
!                     kw['next-sequence']= 0 # now more often defined then previously
                      #
!                     if index==first or index==last:
!                         # provide batching information
!                         if first > 0:
!                             pstart,pend,psize=opt(0,first+overlap,
!                                                   sz,orphan,sequence)
!                             if index==first: kw['previous-sequence']=1
!                             kw['previous-sequence-start-index']=pstart-1
!                             kw['previous-sequence-end-index']=pend-1
!                             kw['previous-sequence-size']=pend+1-pstart
!                         try:
!                             # The following line is a sneaky way to
!                             # test whether there are more items,
!                             # without actually computing a length:
!                             sequence[end]
!                             pstart,pend,psize=opt(end+1-overlap,0,
!                                                   sz,orphan,sequence)
!                             if index==last: kw['next-sequence']=1
!                             kw['next-sequence-start-index']=pstart-1
!                             kw['next-sequence-end-index']=pend-1
!                             kw['next-sequence-size']=pend+1-pstart
!                         except: pass
          
                      if index==last: kw['sequence-end']=1
  
--- 583,610 ----
                  for index in range(first,end):
                      # preset
                      kw['previous-sequence']= 0
!                     kw['next-sequence']= 0 # now more often defined than previously
                      #
!                     # provide batching information
!                     if first > 0:
!                         pstart,pend,psize=opt(0,first+overlap,
!                                               sz,orphan,sequence)
!                         kw['previous-sequence']=1
!                         kw['previous-sequence-start-index']=pstart-1
!                         kw['previous-sequence-end-index']=pend-1
!                         kw['previous-sequence-size']=pend+1-pstart
!                     try:
!                         # The following line is a sneaky way to
!                         # test whether there are more items,
!                         # without actually computing a length:
!                         sequence[end]
!                         pstart,pend,psize=opt(end+1-overlap,0,
!                                               sz,orphan,sequence)
!                         kw['next-sequence']=1
!                         kw['next-sequence-start-index']=pstart-1
!                         kw['next-sequence-end-index']=pend-1
!                         kw['next-sequence-size']=pend+1-pstart
!                     except: pass
          
                      if index==last: kw['sequence-end']=1