[Rt-commit] rt branch, 3.999-trunk, updated. bec8b5459e60191751f212501eacc45e719f2435

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Oct 12 07:44:33 EDT 2009


The branch, 3.999-trunk has been updated
       via  bec8b5459e60191751f212501eacc45e719f2435 (commit)
      from  f2a563a77acea9d209658197d24b0c07246882dc (commit)

Summary of changes:
 share/html/Search/Results.html |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit bec8b5459e60191751f212501eacc45e719f2435
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Mon Oct 12 19:44:24 2009 +0800

    if $ticketcount does not exist, no need to set $link_rel{next} and $link_rel{last}

diff --git a/share/html/Search/Results.html b/share/html/Search/Results.html
index a1cd5d0..ace6682 100755
--- a/share/html/Search/Results.html
+++ b/share/html/Search/Results.html
@@ -178,8 +178,10 @@ my $genpage = sub {
 my $BaseURL = RT->config->get('web_path')."/Search/Results.html?";
 $link_rel{first} = $BaseURL . $genpage->(1)         if $page > 1;
 $link_rel{prev}  = $BaseURL . $genpage->($page - 1) if $page > 1;
-$link_rel{next}  = $BaseURL . $genpage->($page + 1) if ($page * $rows) < $ticketcount;
-$link_rel{last}  = $BaseURL . $genpage->(POSIX::ceil($ticketcount/$rows)) if $rows and ($page * $rows) < $ticketcount;
+if ( $ticketcount ) {
+    $link_rel{next}  = $BaseURL . $genpage->($page + 1) if ($page * $rows) < $ticketcount;
+    $link_rel{last}  = $BaseURL . $genpage->(POSIX::ceil($ticketcount/$rows)) if $rows and ($page * $rows) < $ticketcount;
+}
 </%INIT>
 <%CLEANUP>
 Jifty->web->session->get('tickets')->prep_for_serialization();

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


More information about the Rt-commit mailing list