summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStanislau Wolski <stanislau.wolski@gmail.com>2016-05-30 19:03:45 +0300
committerStanislau Wolski <stanislau.wolski@gmail.com>2016-05-30 19:03:45 +0300
commitdc85c3fd5981f8403aa7b8cc592364c8abe481d0 (patch)
tree9cf196f84e00521f4cf49a56ea9f05c3c132d356
parent13a2331d171575666a506651ceb5db5556d6dfb3 (diff)
parent4a75329e2b743ece62d47439e8a1cfc1048e82cd (diff)
downloadconnector-php-dc85c3fd5981f8403aa7b8cc592364c8abe481d0.zip
connector-php-dc85c3fd5981f8403aa7b8cc592364c8abe481d0.tar.gz
connector-php-dc85c3fd5981f8403aa7b8cc592364c8abe481d0.tar.bz2
Merge branch 'master' of dhx.github:DHTMLX/connector-php
Conflicts: codebase/base_connector.php
-rwxr-xr-xcodebase/base_connector.php4
-rwxr-xr-xcodebase/update.php23
2 files changed, 18 insertions, 9 deletions
diff --git a/codebase/base_connector.php b/codebase/base_connector.php
index aa77491..cb44b15 100755
--- a/codebase/base_connector.php
+++ b/codebase/base_connector.php
@@ -700,6 +700,9 @@ class Connector {
*/
public function set_encoding($encoding){
$this->encoding=$encoding;
+ if ($this->live_update !== false) {
+ $this->live_update->set_encoding($this->encoding);
+ }
}
/*! enable or disable dynamic loading mode
@@ -857,6 +860,7 @@ class Connector {
public function enable_live_update($table, $url=false, $origin_table = false){
$this->live_update = new $this->live_update_data_type($this->sql, $this->config, $this->request, $table,$url, array("connector" => $this, "table" => $origin_table));
$this->live_update->set_event($this->event,$this->names["item_class"]);
+ $this->live_update->set_encoding($this->encoding);
$this->event->attach("beforeOutput", Array($this->live_update, "version_output"));
$this->event->attach("beforeFiltering", Array($this->live_update, "get_updates"));
$this->event->attach("beforeProcessing", Array($this->live_update, "check_collision"));
diff --git a/codebase/update.php b/codebase/update.php
index aa98270..4e73e93 100755
--- a/codebase/update.php
+++ b/codebase/update.php
@@ -104,12 +104,13 @@ class DataUpdate{
protected $table; //!< table , where actions are stored
protected $url; //!< url for notification service, optional
- protected $sql; //!< DB wrapper object
- protected $config; //!< DBConfig object
- protected $request; //!< DBRequestConfig object
- protected $event;
- protected $item_class;
- protected $demu;
+ protected $sql; //!< DB wrapper object
+ protected $config; //!< DBConfig object
+ protected $request; //!< DBRequestConfig object
+ protected $encoding="utf-8";
+ protected $event;
+ protected $item_class;
+ protected $demu;
//protected $config;//!< DataConfig instance
//protected $request;//!< DataRequestConfig instance
@@ -141,6 +142,10 @@ class DataUpdate{
$this->event = $master;
$this->item_class = $name;
}
+
+ public function set_encoding($encoding){
+ $this->encoding = $encoding;
+ }
protected function select_update($actions_table, $join_table, $id_field_name, $version, $user) {
@@ -222,8 +227,8 @@ class DataUpdate{
$output = $this->render_set($this->sql->select($sub_request), $this->item_class);
ob_clean();
- header("Content-type:text/xml");
-
+ header("Content-type:text/xml; charset=".$this->encoding);
+
echo $this->updates_start();
echo $this->get_version();
echo $output;
@@ -346,4 +351,4 @@ class JSONDataUpdate extends DataUpdate {
}
-?> \ No newline at end of file
+?>