diff options
author | Stanislav-Wolski <stanislau.wolski@gmail.com> | 2012-05-28 17:29:54 +0300 |
---|---|---|
committer | Stanislav-Wolski <stanislau.wolski@gmail.com> | 2012-05-28 17:29:54 +0300 |
commit | f412231c95a2d54a1061b597b4032227e5e0bdb5 (patch) | |
tree | 0a4b388edebba591e6fd19dbe1cea2f7978d7294 /codebase/dataview_connector.php | |
parent | 6c5b0c64092ad095d55412b5765c14bd121b508c (diff) | |
download | connector-php-f412231c95a2d54a1061b597b4032227e5e0bdb5.zip connector-php-f412231c95a2d54a1061b597b4032227e5e0bdb5.tar.gz connector-php-f412231c95a2d54a1061b597b4032227e5e0bdb5.tar.bz2 |
[add] csrf defense and render_array functionality
Diffstat (limited to 'codebase/dataview_connector.php')
-rw-r--r-- | codebase/dataview_connector.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/codebase/dataview_connector.php b/codebase/dataview_connector.php index 0c4ca0c..41b7387 100644 --- a/codebase/dataview_connector.php +++ b/codebase/dataview_connector.php @@ -56,14 +56,19 @@ class DataViewConnector extends Connector{ /*! renders self as xml, starting part */ protected function xml_start(){ + $attributes = ""; + foreach($this->attributes as $k=>$v) + $attributes .= " ".$k."='".$v."'"; + + $start.= ">"; if ($this->dload){ if ($pos=$this->request->get_start()) - return "<data pos='".$pos."'>"; + return "<data pos='".$pos."'".$attributes.">"; else - return "<data total_count='".$this->sql->get_size($this->request)."'>"; + return "<data total_count='".$this->sql->get_size($this->request)."'".$attributes.">"; } else - return "<data>"; + return "<data".$attributes.">"; } } ?>
\ No newline at end of file |