From: Andreas Unterkircher Date: Tue, 17 Jul 2007 04:10:42 +0000 (+0000) Subject: issue53, avoid makeing to many ... in the page selector X-Git-Tag: phpfspot-1.2~120 X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d999f86819efb4d2e876a7d690a1306f6bc118fa;p=phpfspot.git issue53, avoid makeing to many ... in the page selector git-svn-id: file:///var/lib/svn/phpfspot/trunk@215 fa6a889d-dae6-447d-9e79-4ba9a3039384 --- diff --git a/phpfspot.class.php b/phpfspot.class.php index 46823e7..fc11611 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -785,6 +785,8 @@ class PHPFSPOT { } } + $dotdot_made = 0; + for($i = 1; $i <= $last_page; $i++) { if($current_page == $i) @@ -819,12 +821,16 @@ class PHPFSPOT { $i == $current_page+3 || $i == $current_page+2 || $i == $current_page+1 /* three after */) { $page_select.= $select; + $dotdot_made = 0; continue; } } - $page_select.= "."; + if(!$dotdot_made) { + $page_select.= "......... "; + $dotdot_made = 1; + } } /* only show the page selector if we have more then one page */