[freeside-commits] branch master updated. 75873f3e9e5f1da270589fd3dadba593d2b92d01

Ivan ivan at 420.am
Fri Nov 15 15:14:48 PST 2013


The branch, master has been updated
       via  75873f3e9e5f1da270589fd3dadba593d2b92d01 (commit)
      from  0be78acfcd733ca079ab946f4ba4b46429c28c1c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 75873f3e9e5f1da270589fd3dadba593d2b92d01
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Fri Nov 15 15:14:47 2013 -0800

    fix sorting by a column advancing a page, RT#25740

diff --git a/httemplate/elements/pager.html b/httemplate/elements/pager.html
index a53300f..d360e64 100644
--- a/httemplate/elements/pager.html
+++ b/httemplate/elements/pager.html
@@ -1,13 +1,8 @@
-% my %opt = @_;
-% my $pager = '';
-%
 % if ( $opt{'total'} != $opt{'num_rows'} && $opt{'maxrecords'} ) {
 %
 %   unless ( $opt{'offset'} == 0 ) {
 %     $cgi->param('offset', $opt{'offset'} - $opt{'maxrecords'});
-
       <A HREF="<% $cgi->self_url %>"><B><FONT SIZE="+1">Previous</FONT></B></A>
-
 %   }
 %
 %   my $page = 0;
@@ -47,9 +42,17 @@
 %
 %   unless ( $opt{'offset'} + $opt{'maxrecords'} > $opt{'total'} ) {
 %     $cgi->param('offset', $opt{'offset'} + $opt{'maxrecords'});
-
       <A HREF="<% $cgi->self_url %>"><B><FONT SIZE="+1">Next</FONT></B></A>
-%
 %   }
 %
+%   $cgi->param('offset', $orig_offset); #so future $self_url invocations don't advance a page
+%
 % }
+<%init>
+
+my %opt = @_;
+
+my $orig_offset = $opt{'offset'};
+
+</%init>
+

-----------------------------------------------------------------------

Summary of changes:
 httemplate/elements/pager.html |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)




More information about the freeside-commits mailing list