Passed
Push — 1.10.x ( b21e58...6eb659 )
by
unknown
667:27 queued 619:39
created
main/inc/lib/sortable_table.class.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
         $this->per_page = isset($_GET[$this->param_prefix.'per_page']) ? intval($_GET[$this->param_prefix.'per_page']) : $this->per_page;
176 176
 
177 177
         $_SESSION[$this->param_prefix.'per_page']  = $this->per_page;
178
-        $_SESSION[$this->param_prefix.'direction'] = $this->direction ;
178
+        $_SESSION[$this->param_prefix.'direction'] = $this->direction;
179 179
         $_SESSION[$this->param_prefix.'page_nr']   = $this->page_nr;
180 180
         $_SESSION[$this->param_prefix.'column']    = $this->column;
181 181
         $this->pager                               = null;
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
             $params['spacesBeforeSeparator'] = '';
216 216
             $params['spacesAfterSeparator']  = '';
217 217
             $query_vars = array_keys($_GET);
218
-            $query_vars_needed = array ($this->param_prefix.'column', $this->param_prefix.'direction', $this->param_prefix.'per_page');
218
+            $query_vars_needed = array($this->param_prefix.'column', $this->param_prefix.'direction', $this->param_prefix.'per_page');
219 219
             if (count($this->additional_parameters) > 0) {
220 220
                 $query_vars_needed = array_merge($query_vars_needed, array_keys($this->additional_parameters));
221 221
             }
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 
290 290
         if (!$empty_table) {
291 291
             if (!empty($this->additional_parameters)) {
292
-                foreach($this->additional_parameters as $key => $value) {
292
+                foreach ($this->additional_parameters as $key => $value) {
293 293
                     $html .= '<input type="hidden" name ="'.Security::remove_XSS($key).'" value ="'.Security::remove_XSS($value).'" />';
294 294
                 }
295 295
             }
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
                         $html .= '<li><a data-action ="'.$action.'" href="#" onclick="javascript:action_click(this, \''.$table_id.'\');">'.$label.'</a></li>';
315 315
                     }
316 316
                     $html .= '</ul>';
317
-                    $html .= '</div>';//btn-group
317
+                    $html .= '</div>'; //btn-group
318 318
                 $html .= '</div>'; //toolbar
319 319
             } else {
320 320
                 $html .= $form;
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
             }
339 339
         }
340 340
         
341
-        return '<div class="table-responsive">' . $html . '</div>';
341
+        return '<div class="table-responsive">'.$html.'</div>';
342 342
     }
343 343
 
344 344
     /**
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
 
394 394
             $html .= '<div class="clear"></div>';
395 395
             if (count($this->form_actions) > 0) {
396
-                $script= '<script>
396
+                $script = '<script>
397 397
                             /*<![CDATA[*/
398 398
                             function setCheckbox(value) {
399 399
                                  d = document.form_'.$this->table_name.';
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
             }
416 416
         }
417 417
         // Getting the items of the table
418
-        $items = $this->get_clean_html(false);    //no sort
418
+        $items = $this->get_clean_html(false); //no sort
419 419
 
420 420
         // Generation of style classes must be improved. Maybe we need a a table name to create style on the fly:
421 421
         // i.e: .whoisonline_table_grid_container instead of  .grid_container
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
 
484 484
             $html .= '<div class="clear"></div>';
485 485
             if (count($this->form_actions) > 0) {
486
-                $script= '<script>
486
+                $script = '<script>
487 487
                             /*<![CDATA[*/
488 488
                             function setCheckbox(value) {
489 489
                                  d = document.form_'.$this->table_name.';
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
                     $counter = 0;
590 590
                     foreach ($row as $index => $rowInfo) {
591 591
                         if (!isset($this->columnsToHide[$index])) {
592
-                            $newRow[$counter] = $rowInfo ;
592
+                            $newRow[$counter] = $rowInfo;
593 593
                             $counter++;
594 594
                         }
595 595
                     }
@@ -604,7 +604,7 @@  discard block
 block discarded – undo
604 604
         }
605 605
 
606 606
         if ($this->odd_even_rows_enabled == true) {
607
-            $this->altRowAttributes(0, array ('class' => 'row_odd'), array ('class' => 'row_even'), true);
607
+            $this->altRowAttributes(0, array('class' => 'row_odd'), array('class' => 'row_even'), true);
608 608
         }
609 609
 
610 610
         foreach ($this->th_attributes as $column => $attributes) {
@@ -664,11 +664,11 @@  discard block
 block discarded – undo
664 664
         }
665 665
         $result[] = '<select name="'.$this->param_prefix.'per_page" onchange="javascript: this.form.submit();">';
666 666
         for ($nr = 10; $nr <= min(50, $total_number_of_items); $nr += 10) {
667
-            $result[] = '<option value="'.$nr.'" '. ($nr == $this->per_page ? 'selected="selected"' : '').'>'.$nr.'</option>';
667
+            $result[] = '<option value="'.$nr.'" '.($nr == $this->per_page ? 'selected="selected"' : '').'>'.$nr.'</option>';
668 668
         }
669 669
         // @todo no limits
670 670
         //if ($total_number_of_items < 500) {
671
-            $result[] = '<option value="'.$total_number_of_items.'" '. ($total_number_of_items == $this->per_page ? 'selected="selected"' : '').'>'.api_ucfirst(get_lang('All')).'</option>';
671
+            $result[] = '<option value="'.$total_number_of_items.'" '.($total_number_of_items == $this->per_page ? 'selected="selected"' : '').'>'.api_ucfirst(get_lang('All')).'</option>';
672 672
         //}
673 673
         $result[] = '</select>';
674 674
         $result[] = '<noscript>';
@@ -780,7 +780,7 @@  discard block
 block discarded – undo
780 780
      */
781 781
     public function get_additional_url_paramstring()
782 782
     {
783
-        $param_string_parts = array ();
783
+        $param_string_parts = array();
784 784
         if (is_array($this->additional_parameters) && count($this->additional_parameters) > 0) {
785 785
             foreach ($this->additional_parameters as $key => & $value) {
786 786
                 $param_string_parts[] = urlencode($key).'='.urlencode($value);
@@ -793,7 +793,7 @@  discard block
 block discarded – undo
793 793
                 //$param[$tablename.'_direction'] = $_GET[$tablename.'_direction'];
794 794
                 $my_get_direction = $_GET[$tablename.'_direction'];
795 795
                 if (!in_array($my_get_direction, array('ASC', 'DESC'))) {
796
-                     $param[$tablename.'_direction'] =  'ASC';
796
+                     $param[$tablename.'_direction'] = 'ASC';
797 797
                 } else {
798 798
                     $param[$tablename.'_direction'] = $my_get_direction;
799 799
                 }
@@ -807,7 +807,7 @@  discard block
 block discarded – undo
807 807
             if (isset($_GET[$tablename.'_column'])) {
808 808
                 $param[$tablename.'_column'] = intval($_GET[$tablename.'_column']);
809 809
             }
810
-            $param_string_parts = array ();
810
+            $param_string_parts = array();
811 811
             foreach ($param as $key => & $value) {
812 812
                 $param_string_parts[] = urlencode($key).'='.urlencode($value);
813 813
             }
@@ -827,7 +827,7 @@  discard block
 block discarded – undo
827 827
         $param[$this->param_prefix.'page_nr'] = $this->page_nr;
828 828
         $param[$this->param_prefix.'per_page'] = $this->per_page;
829 829
         $param[$this->param_prefix.'column'] = $this->column;
830
-        $param_string_parts = array ();
830
+        $param_string_parts = array();
831 831
         foreach ($param as $key => & $value) {
832 832
             $param_string_parts[] = urlencode($key).'='.urlencode($value);
833 833
         }
Please login to merge, or discard this patch.