diff options
author | Maksim Kozhukh <mkozhukh@ya.ru> | 2014-08-05 15:01:47 +0300 |
---|---|---|
committer | Maksim Kozhukh <mkozhukh@ya.ru> | 2014-08-05 15:01:47 +0300 |
commit | 4fc1e6da2aaf2e9c47c31b2b4d247c3ed99dc9d2 (patch) | |
tree | 7c9727bcb6f892da9654e2cc2832047f96739ecf | |
parent | ecf8ef91dae3311af98d1188bdf9eb28cf267a1c (diff) | |
download | connector-php-4fc1e6da2aaf2e9c47c31b2b4d247c3ed99dc9d2.zip connector-php-4fc1e6da2aaf2e9c47c31b2b4d247c3ed99dc9d2.tar.gz connector-php-4fc1e6da2aaf2e9c47c31b2b4d247c3ed99dc9d2.tar.bz2 |
[fix] xmlcontent attribute and grid's xml
-rw-r--r-- | codebase/grid_connector.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/codebase/grid_connector.php b/codebase/grid_connector.php index 10a98bd..d9be16a 100644 --- a/codebase/grid_connector.php +++ b/codebase/grid_connector.php @@ -94,13 +94,20 @@ class GridDataItem extends DataItem{ for ($i=0; $i < sizeof($this->config->text); $i++){ $str.="<cell"; $name=$this->config->text[$i]["name"]; + $xmlcontent = false; if (isset($this->cell_attrs[$name])){ $cattrs=$this->cell_attrs[$name]; - foreach ($cattrs as $k => $v) + foreach ($cattrs as $k => $v){ $str.=" ".$k."='".$this->xmlentities($v)."'"; + if ($k == "xmlcontent") + $xmlcontent = true; + } } $value = isset($this->data[$name]) ? $this->data[$name] : ''; - $str.="><![CDATA[".$value."]]></cell>"; + if (!$xmlcontent) + $str.="><![CDATA[".$value."]]></cell>"; + else + $str.=">".$value."</cell>"; } if ($this->userdata !== false) foreach ($this->userdata as $key => $value) |