Marius Cramer
2015-06-29 a9b32524711b32a1a42bbb26fd6a3006a7d2d07a
interface/lib/classes/listform.inc.php
@@ -124,6 +124,17 @@
            $this->errorMessage .= "Custom datasource class or function is empty<br />\r\n";
         }
      }
      if($api == false && isset($field['filters']) && is_array($field['filters'])) {
         $new_values = array();
         foreach($values as $index => $value) {
            $new_index = $app->tform->filterField($index, $index, $field['filters'], 'SHOW');
            $new_values[$new_index] = $app->tform->filterField($index, (isset($values[$index]))?$values[$index]:'', $field['filters'], 'SHOW');
         }
         $values = $new_values;
         unset($new_values);
         unset($new_index);
      }
      return $values;
   }
@@ -246,6 +257,7 @@
      return $this->pagingValues[$key];
   }
   /* TODO: maybe rewrite sql */
   public function getPagingSQL($sql_where = '1')
   {
      global $app, $conf;
@@ -283,7 +295,7 @@
      if($this->searchChanged == 1) $_SESSION['search'][$list_name]['page'] = 0;
      $sql_von = $app->functions->intval($_SESSION['search'][$list_name]['page'] * $records_per_page);
      $record_count = $app->db->queryOneRecord("SELECT count(*) AS anzahl FROM $table".($app->listform->listDef['additional_tables'] != ''? ','.$app->listform->listDef['additional_tables'] : '')." WHERE $sql_where");
      $record_count = $app->db->queryOneRecord("SELECT count(*) AS anzahl FROM ??".($app->listform->listDef['additional_tables'] != ''? ','.$app->listform->listDef['additional_tables'] : '')." WHERE $sql_where", $table);
      $pages = $app->functions->intval(($record_count['anzahl'] - 1) / $records_per_page);
@@ -482,7 +494,8 @@
      }
      return $record;
   }
   /* TODO: check double quoting of SQL */
   public function encode($record)
   {
      global $app;