diff options
author | Stanislau Wolski <stanislau.wolski@gmail.com> | 2013-05-30 17:21:39 +0300 |
---|---|---|
committer | Stanislau Wolski <stanislau.wolski@gmail.com> | 2013-05-30 17:21:39 +0300 |
commit | 7db8ad5ff3dcfe12e9c2044c55b93322f980f6a8 (patch) | |
tree | c4a4f321d968678a0f36be64aa51512f36d470f8 /codebase/base_connector.php | |
parent | 5879c60d3f11c3dc828ce80cf3e41259693e1d5e (diff) | |
parent | eb0386dd25a066532be6549a342e61d80c438477 (diff) | |
download | connector-php-7db8ad5ff3dcfe12e9c2044c55b93322f980f6a8.zip connector-php-7db8ad5ff3dcfe12e9c2044c55b93322f980f6a8.tar.gz connector-php-7db8ad5ff3dcfe12e9c2044c55b93322f980f6a8.tar.bz2 |
Merge branch 'master' of 192.168.1.251:connector-php
Diffstat (limited to 'codebase/base_connector.php')
-rw-r--r-- | codebase/base_connector.php | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/codebase/base_connector.php b/codebase/base_connector.php index 850f6d7..ac25b00 100644 --- a/codebase/base_connector.php +++ b/codebase/base_connector.php @@ -448,7 +448,7 @@ class Connector { public function render_array($data, $id, $fields, $extra=false, $relation_id=false){ $this->configure("-",$id,$fields,$extra,$relation_id); - $this->sql = new ArrayDBDataWrapper($data, null); + $this->sql = new ArrayDBDataWrapper($data, $this->config); return $this->render(); } @@ -578,10 +578,14 @@ class Connector { protected function parse_request(){ //set default dyn. loading params, can be reset in child classes if ($this->dload) - $this->request->set_limit(0,$this->dload); + $this->request->set_limit(0,$this->dload); else if ($this->limit) $this->request->set_limit(0,$this->limit); - + + if (isset($_GET["posStart"]) && isset($_GET["count"])) { + $this->request->set_limit($_GET["posStart"],$_GET["count"]); + } + $this->parse_request_mode(); if ($this->live_update && ($this->updating || $this->editing)){ @@ -732,6 +736,14 @@ class Connector { */ protected function xml_start(){ $attributes = ""; + + if ($this->dload){ + //info for dyn. loadin + if ($pos=$this->request->get_start()) + $attributes .= " pos='".$pos."'"; + else + $attributes .= " total_count='".$this->sql->get_size($this->request)."'"; + } foreach($this->attributes as $k=>$v) $attributes .= " ".$k."='".$v."'"; |