@@ -39,18 +39,18 @@ discard block |
||
| 39 | 39 | $this->point = 0; |
| 40 | 40 | |
| 41 | 41 | $first_page = $cur_page - (int) ($page_count / 2); |
| 42 | - if($first_page < 1 || $total_page <= $page_count) |
|
| 42 | + if ($first_page < 1 || $total_page <= $page_count) |
|
| 43 | 43 | { |
| 44 | 44 | $first_page = 1; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - if($total_page > $page_count && $first_page + $page_count - 1 > $total_page) |
|
| 47 | + if ($total_page > $page_count && $first_page + $page_count - 1 > $total_page) |
|
| 48 | 48 | { |
| 49 | 49 | $first_page -= $first_page + $page_count - 1 - $total_page; |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | $last_page = $total_page; |
| 53 | - if($last_page > $total_page) |
|
| 53 | + if ($last_page > $total_page) |
|
| 54 | 54 | { |
| 55 | 55 | $last_page = $total_page; |
| 56 | 56 | } |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | $this->first_page = $first_page; |
| 59 | 59 | $this->last_page = $last_page; |
| 60 | 60 | |
| 61 | - if($total_page < $this->page_count) |
|
| 61 | + if ($total_page < $this->page_count) |
|
| 62 | 62 | { |
| 63 | 63 | $this->page_count = $total_page; |
| 64 | 64 | } |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | function getNextPage() |
| 72 | 72 | { |
| 73 | 73 | $page = $this->first_page + $this->point++; |
| 74 | - if($this->point > $this->page_count || $page > $this->last_page) |
|
| 74 | + if ($this->point > $this->page_count || $page > $this->last_page) |
|
| 75 | 75 | { |
| 76 | 76 | $page = 0; |
| 77 | 77 | } |