diff options
author | Ivan Kohler <ivan@freeside.biz> | 2015-05-06 19:10:52 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2015-05-06 19:10:52 -0700 |
commit | 5316c7deaf01870af0b26035bb194e3d873b027d (patch) | |
tree | 7f1726b23e43b11eb815017577ee770d5b59da4c /httemplate/search | |
parent | 832ae1aae9af2f15dc9b513c6505db25462ac511 (diff) | |
parent | 3f36e519d061f6ca0102ba7887e9fee9b1bda874 (diff) |
Merge branch 'FREESIDE_3_BRANCH' of git.freeside.biz:/home/git/freeside into FREESIDE_3_BRANCH
Diffstat (limited to 'httemplate/search')
-rw-r--r-- | httemplate/search/cust_msg.html | 2 | ||||
-rw-r--r-- | httemplate/search/elements/search.html | 9 |
2 files changed, 5 insertions, 6 deletions
diff --git a/httemplate/search/cust_msg.html b/httemplate/search/cust_msg.html index 486c7b09c..c5222e105 100644 --- a/httemplate/search/cust_msg.html +++ b/httemplate/search/cust_msg.html @@ -47,7 +47,7 @@ ], 'html_init' => $html_init, 'really_disable_download' => 1, - @_ + 'order_by' => '_date DESC', &> <%init> #hmm... diff --git a/httemplate/search/elements/search.html b/httemplate/search/elements/search.html index b70b82db2..053da4787 100644 --- a/httemplate/search/elements/search.html +++ b/httemplate/search/elements/search.html @@ -386,10 +386,7 @@ unless ( $type =~ /^(csv|xml|\w*.xls)$/) { } #order by override -my $order_by = ''; -#if ( $cgi->param('order_by') =~ /^([\w\, ]+)$/ ) { -# $order_by = $1; -#} +my $order_by = $opt{order_by} || ''; $order_by = $cgi->param('order_by') if $cgi->param('order_by'); # run the query @@ -415,6 +412,8 @@ if ( ref($opt{query}) ) { } } + $opt{query}->{'order_by'} .= " $limit"; + } elsif (ref($opt{query}) eq 'ARRAY') { @query = @{ $opt{query} }; } else { @@ -434,7 +433,7 @@ if ( ref($opt{query}) ) { } @query ], - 'order_by' => $opt{order_by}. " ". $limit, + #'order_by' => $opt{order_by}. " ". $limit, ) ]; } else { |