issue53, avoid makeing to many ... in the page selector
authorAndreas Unterkircher <unki@netshadow.at>
Tue, 17 Jul 2007 04:10:42 +0000 (04:10 +0000)
committerAndreas Unterkircher <unki@netshadow.at>
Tue, 17 Jul 2007 04:10:42 +0000 (04:10 +0000)
git-svn-id: file:///var/lib/svn/phpfspot/trunk@215 fa6a889d-dae6-447d-9e79-4ba9a3039384

phpfspot.class.php

index 46823e7ada656ae037f9460f0592667c87361de9..fc116118698b23861ea16f09c155869ee9d0b69f 100644 (file)
@@ -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.= ".........&nbsp;";
+               $dotdot_made = 1;
+            }
          }
 
          /* only show the page selector if we have more then one page */