diff options
author | Dmitry <dmitry@dhtmlx.com> | 2012-05-22 17:19:46 +0200 |
---|---|---|
committer | Dmitry <dmitry@dhtmlx.com> | 2012-05-22 17:19:46 +0200 |
commit | 599f673d49d93d6e4726a90cd0675f3742a86aa7 (patch) | |
tree | 9839fd3145bd4758e1092a9a017aee18b2b80b25 /codebase/data_connector.php | |
parent | 026ddb3374e533dbd26a3374eb316092e762e2a3 (diff) | |
download | connector-php-599f673d49d93d6e4726a90cd0675f3742a86aa7.zip connector-php-599f673d49d93d6e4726a90cd0675f3742a86aa7.tar.gz connector-php-599f673d49d93d6e4726a90cd0675f3742a86aa7.tar.bz2 |
improve code
Diffstat (limited to 'codebase/data_connector.php')
-rw-r--r-- | codebase/data_connector.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/codebase/data_connector.php b/codebase/data_connector.php index ac76c74..6db082d 100644 --- a/codebase/data_connector.php +++ b/codebase/data_connector.php @@ -223,7 +223,7 @@ class JSONDataConnector extends DataConnector{ $collections = $this->fill_collections(); if (!empty($this->extra_output)) - $end .= ', "collections": {'.$this->extra_output.'} }'; + $end .= ', "collections": {'.$this->extra_output.'}'; $is_sections = sizeof($this->sections) && $this->is_first_call(); @@ -240,12 +240,12 @@ class JSONDataConnector extends DataConnector{ if ($this->dload){ //info for dyn. loadin if ($pos=$this->request->get_start()) - $end .= ", \"pos\":".$pos." }"; + $end .= ", \"pos\":".$pos; else - $end .= ", \"pos\":0, \"total_count\":".$this->sql->get_size($this->request)." }"; - } else - $end .= " }"; + $end .= ", \"pos\":0, \"total_count\":".$this->sql->get_size($this->request); + } } + $end .= " }"; $out = new OutputWriter($start, $end); $out->set_type("json"); $this->event->trigger("beforeOutput", $this, $out); |