@@ -27,7 +27,9 @@ discard block |
||
| 27 | 27 | $filter=''; |
| 28 | 28 | foreach ($this->filterColumn as $column) |
| 29 | 29 | { |
| 30 | - if ($filter != "") $filter.=' OR '; |
|
| 30 | + if ($filter != "") { |
|
| 31 | + $filter.=' OR '; |
|
| 32 | + } |
|
| 31 | 33 | //$filter .= "'" . $column . "' LIKE '%" . $this->filterString. "%'"; |
| 32 | 34 | $filter .= $column . " LIKE '%" . $this->filterString. "%'"; |
| 33 | 35 | } |
@@ -70,7 +72,9 @@ discard block |
||
| 70 | 72 | |
| 71 | 73 | protected function curFilterQuery() |
| 72 | 74 | { |
| 73 | - if ($this->filterQuery == '') return ''; |
|
| 75 | + if ($this->filterQuery == '') { |
|
| 76 | + return ''; |
|
| 77 | + } |
|
| 74 | 78 | return 'f='.$this->filterQuery; |
| 75 | 79 | } |
| 76 | 80 | |
@@ -67,17 +67,21 @@ discard block |
||
| 67 | 67 | { |
| 68 | 68 | $actionURL = $this->getCurrentURL() . '?' ; |
| 69 | 69 | $QSList=array(); |
| 70 | - if ($caller != 'filter' && $this->curFilterQuery() != '') |
|
| 71 | - array_push($QSList , $this->curFilterQuery()); |
|
| 70 | + if ($caller != 'filter' && $this->curFilterQuery() != '') { |
|
| 71 | + array_push($QSList , $this->curFilterQuery()); |
|
| 72 | + } |
|
| 72 | 73 | |
| 73 | - if ($caller != 'paging' && $caller != 'filter' && $this->curPagingQuery() != '') |
|
| 74 | - array_push($QSList , $this->curPagingQuery()); |
|
| 74 | + if ($caller != 'paging' && $caller != 'filter' && $this->curPagingQuery() != '') { |
|
| 75 | + array_push($QSList , $this->curPagingQuery()); |
|
| 76 | + } |
|
| 75 | 77 | |
| 76 | - if ($caller != 'order' && $this->curOrderQuery() != '') |
|
| 77 | - array_push($QSList , $this->curOrderQuery()); |
|
| 78 | + if ($caller != 'order' && $this->curOrderQuery() != '') { |
|
| 79 | + array_push($QSList , $this->curOrderQuery()); |
|
| 80 | + } |
|
| 78 | 81 | |
| 79 | - if (count($QSList) != 0) |
|
| 80 | - $actionURL .= implode('&', $QSList) . '&'; |
|
| 82 | + if (count($QSList) != 0) { |
|
| 83 | + $actionURL .= implode('&', $QSList) . '&'; |
|
| 84 | + } |
|
| 81 | 85 | |
| 82 | 86 | return $actionURL; |
| 83 | 87 | } |
@@ -129,20 +133,17 @@ discard block |
||
| 129 | 133 | if ($this->order[$titleOrder] == 'ASC') |
| 130 | 134 | { |
| 131 | 135 | $titleOrder.='DESC'; |
| 132 | - } |
|
| 133 | - else |
|
| 136 | + } else |
|
| 134 | 137 | { |
| 135 | 138 | $titleOrder.='ASC'; |
| 136 | 139 | } |
| 137 | - } |
|
| 138 | - else |
|
| 140 | + } else |
|
| 139 | 141 | { |
| 140 | 142 | $titleOrder.='ASC'; |
| 141 | 143 | } |
| 142 | 144 | $actionURL = $this->getCurrentURLAndQS('order').'o='.$titleOrder; |
| 143 | 145 | $html .= '<th><a href="'.$actionURL.'">' . $values . '</a></th>'; |
| 144 | - } |
|
| 145 | - else |
|
| 146 | + } else |
|
| 146 | 147 | { |
| 147 | 148 | $html .= '<th>' . $values . '</th>'; |
| 148 | 149 | } |
@@ -46,7 +46,9 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | protected function curPagingQuery() |
| 48 | 48 | { |
| 49 | - if ($this->currentPage == '') return ''; |
|
| 49 | + if ($this->currentPage == '') { |
|
| 50 | + return ''; |
|
| 51 | + } |
|
| 50 | 52 | return 'page='.$this->currentPage; |
| 51 | 53 | } |
| 52 | 54 | |
@@ -58,10 +60,14 @@ discard block |
||
| 58 | 60 | return 'count : ' . $this->count() . '<br>'; |
| 59 | 61 | } |
| 60 | 62 | |
| 61 | - if ($this->currentPage == 0) $this->currentPage = 1; |
|
| 63 | + if ($this->currentPage == 0) { |
|
| 64 | + $this->currentPage = 1; |
|
| 65 | + } |
|
| 62 | 66 | |
| 63 | 67 | $numPages = intdiv($count , $this->maxPerPage); |
| 64 | - if ($count % $this->maxPerPage != 0 ) $numPages++; |
|
| 68 | + if ($count % $this->maxPerPage != 0 ) { |
|
| 69 | + $numPages++; |
|
| 70 | + } |
|
| 65 | 71 | |
| 66 | 72 | $html = '<div class="pagination-control" role="navigation">'; |
| 67 | 73 | $html .= '<ul class="nav tab-nav">'; |
@@ -75,8 +81,7 @@ discard block |
||
| 75 | 81 | </span> |
| 76 | 82 | </li> |
| 77 | 83 | '; |
| 78 | - } |
|
| 79 | - else |
|
| 84 | + } else |
|
| 80 | 85 | { |
| 81 | 86 | $html .= ' |
| 82 | 87 | <li class="nav-item"> |
@@ -92,7 +97,9 @@ discard block |
||
| 92 | 97 | $active = ($this->currentPage == $i) ? 'active' : ''; |
| 93 | 98 | $first = ($i-1)*$this->maxPerPage+1; |
| 94 | 99 | $last = $i * $this->maxPerPage; |
| 95 | - if ($last > $count) $last = $count; |
|
| 100 | + if ($last > $count) { |
|
| 101 | + $last = $count; |
|
| 102 | + } |
|
| 96 | 103 | $display = 'Show rows '. $first . ' to '. $last .' of '. $count; |
| 97 | 104 | $html .= '<li class="' . $active . ' nav-item"> |
| 98 | 105 | <a href="'. $this->getCurrentURLAndQS('paging') .'&page='. $i .'" title="' . $display . '" aria-label="' . $display . '"> |
@@ -111,8 +118,7 @@ discard block |
||
| 111 | 118 | </span> |
| 112 | 119 | </li> |
| 113 | 120 | '; |
| 114 | - } |
|
| 115 | - else |
|
| 121 | + } else |
|
| 116 | 122 | { |
| 117 | 123 | $html .= ' |
| 118 | 124 | <li class="nav-item"> |
@@ -20,7 +20,9 @@ discard block |
||
| 20 | 20 | $orderSQL=''; |
| 21 | 21 | foreach ($this->order as $column => $direction) |
| 22 | 22 | { |
| 23 | - if ($orderSQL != "") $orderSQL.=','; |
|
| 23 | + if ($orderSQL != "") { |
|
| 24 | + $orderSQL.=','; |
|
| 25 | + } |
|
| 24 | 26 | |
| 25 | 27 | $orderSQL .= $column . ' ' . $direction; |
| 26 | 28 | } |
@@ -37,7 +39,9 @@ discard block |
||
| 37 | 39 | |
| 38 | 40 | public function isOrderSet() |
| 39 | 41 | { |
| 40 | - if (count($this->order) == 0) return FALSE; |
|
| 42 | + if (count($this->order) == 0) { |
|
| 43 | + return FALSE; |
|
| 44 | + } |
|
| 41 | 45 | return TRUE; |
| 42 | 46 | } |
| 43 | 47 | |
@@ -58,7 +62,9 @@ discard block |
||
| 58 | 62 | |
| 59 | 63 | protected function curOrderQuery() |
| 60 | 64 | { |
| 61 | - if ($this->orderQuery == '') return ''; |
|
| 65 | + if ($this->orderQuery == '') { |
|
| 66 | + return ''; |
|
| 67 | + } |
|
| 62 | 68 | return 'o='.$this->orderQuery; |
| 63 | 69 | } |
| 64 | 70 | |
@@ -38,7 +38,9 @@ |
||
| 38 | 38 | |
| 39 | 39 | public function groupingNextLine( $values) |
| 40 | 40 | { |
| 41 | - if ($this->grouppingActive === FALSE) return ''; |
|
| 41 | + if ($this->grouppingActive === FALSE) { |
|
| 42 | + return ''; |
|
| 43 | + } |
|
| 42 | 44 | |
| 43 | 45 | $dbcol = $this->groupingColumn; |
| 44 | 46 | if ($this->groupingVal == '' || $this->groupingVal != $values->$dbcol ) |