Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.1.5

Request #8233 No possibility to render current sorting column/direction
Submitted: 2006-07-17 10:59 UTC
From: alexkunin at gmail dot com Assigned: wiesemann
Status: Closed Package: Structures_DataGrid_Renderer_Smarty (version 0.1.0)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2006-07-17 10:59 UTC] alexkunin at gmail dot com (Alex Kunin)
Description: ------------ For each column this renderer passes to Smarty only 'label' and 'link' values. But these values are not enough to find out if this particular column is current and is it ASC of DESC. Test script: --------------- This patch works for me (hopefully will work for others too): --- old\Smarty.php Mon Jul 17 13:52:26 2006 +++ Smarty.php Mon Jul 17 13:53:15 2006 @@ -217,6 +217,7 @@ } else { $direction = 'ASC'; } + $prepared[$index]['current'] = $direction; } else { $direction = 'ASC'; }

Comments

 [2006-07-17 19:31 UTC] wiesemann (Mark Wiesemann)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. --- Your patch did not take into account that there could be more than one sorting column. I've added a new variable 'currentSort' to CVS code which is an array with all the information you need.