mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-22 13:02:39 +09:00
Finish 4.11.17
This commit is contained in:
commit
5b85fbbdd8
1 file changed
+7
-9
@@ -82,19 +82,17 @@ class Box_Paginator {
|
||||
|
||||
private function calculateRange()
|
||||
{
|
||||
$startRange = $this->currentPage - floor($this->midRange/2);
|
||||
$endRange = $this->currentPage + floor($this->midRange/2);
|
||||
$startRange = $this->currentPage - floor($this->midRange / 2);
|
||||
$endRange = $this->currentPage + floor($this->midRange / 2);
|
||||
|
||||
if($startRange <= 0)
|
||||
{
|
||||
$endRange += abs($startRange)+1;
|
||||
if ($startRange <= 0) {
|
||||
$endRange += abs($startRange) + 1;
|
||||
$startRange = 1;
|
||||
}
|
||||
|
||||
if($endRange > $this->numPages)
|
||||
{
|
||||
$startRange -= $endRange-$this->numPages;
|
||||
$endRange = $this->numPages;
|
||||
if ($endRange > $this->numPages) {
|
||||
$endRange = $this->numPages;
|
||||
$startRange = $endRange - $this->numPages + 1;
|
||||
}
|
||||
|
||||
$this->range = range($startRange, $endRange);
|
||||
|
||||
Reference in new issue
Block a user