[freeside-commits] branch FREESIDE_3_BRANCH updated. 060d5ba818caef48a659ed3c2e6a22b5c3d69d10

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


The branch, FREESIDE_3_BRANCH has been updated
       via  060d5ba818caef48a659ed3c2e6a22b5c3d69d10 (commit)
      from  00358dd85b3fa5d854ea508a9bb2fb9b92c7c2ba (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 060d5ba818caef48a659ed3c2e6a22b5c3d69d10
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Fri Nov 15 15:14:48 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