Changeset 3718

Show
Ignore:
Timestamp:
11/19/07 04:07:47 (1 year ago)
Author:
roger
Message:

Ensure Paginate.get_href method doesn't change instance inner state (ticket #1605). Thanks to Juan Germano for spotting this and giving the patch.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0/CHANGELOG.txt

    r3716 r3718  
    2828      and synonyms' attributes. It also supports SQLAlchemy 0.4.1, which  
    2929      removed the "properties" accessor on Mapper. 
     30    * Tickets #1605. Ensure paginate links bring the same result when using 
     31      ordering columns with a custom datagrid template. 
    3032     
    3133 
    3234*Contributors* 
    3335 
    34 Joel Pearson, Christoph Zwerschke, Roger Demetrescu 
     36Joel Pearson, Christoph Zwerschke, Roger Demetrescu, Juan Germano 
    3537 
    36381.0.4b2 (October, 27, 2007): 
  • branches/1.0/turbogears/paginate.py

    r3716 r3718  
    321321        # to break the API. 
    322322        order = order or None 
    323         self.input_values[self.var_name + '_tgp_no'] = page 
     323        input_values = self.input_values.copy() 
     324        input_values[self.var_name + '_tgp_no'] = page 
    324325        if order: 
    325             self.input_values[self.var_name + '_tgp_order'] = order 
    326  
    327         return turbogears.url('', self.input_values) 
     326            input_values[ self.var_name + '_tgp_order'] = order 
     327 
     328        return turbogears.url('', input_values) 
    328329 
    329330def _select_pages_to_show(current_page, page_count, max_pages):