Changeset 3719

Show
Ignore:
Timestamp:
11/19/07 04:08:17 (8 months 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.1/CHANGELOG.txt

    r3717 r3719  
    4444      and synonyms' attributes. It also supports SQLAlchemy 0.4.1, which  
    4545      removed the "properties" accessor on Mapper. 
    46  
    47 *Contributors* 
    48  
    49 Joel Pearson, Christoph Zwerschke, Roger Demetrescu 
     46    * Tickets #1605. Ensure paginate links bring the same result when using 
     47      ordering columns with a custom datagrid template. 
     48 
     49*Contributors* 
     50 
     51Joel Pearson, Christoph Zwerschke, Roger Demetrescu, Juan Germano 
    5052 
    51531.0.4b2 (October, 27, 2007): 
  • branches/1.1/turbogears/paginate.py

    r3717 r3719  
    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):