diff options
Diffstat (limited to 'codebase')
-rwxr-xr-x | codebase/base_connector.php | 8 | ||||
-rwxr-xr-x | codebase/update.php | 21 |
2 files changed, 19 insertions, 10 deletions
diff --git a/codebase/base_connector.php b/codebase/base_connector.php index 4e033b2..01a42ce 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 @@ -855,8 +858,9 @@ class Connector { url used for update notifications */ public function enable_live_update($table, $url=false){ - $this->live_update = new $this->live_update_data_type($this->sql, $this->config, $this->request, $table,$url, array("connector" => $this)); - $this->live_update->set_event($this->event,$this->names["item_class"]); + $this->live_update = new $this->live_update_data_type($this->sql, $this->config, $this->request, $table,$url, array("connector" => $this)); + $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 9ef12ac..e8bd2ed 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) {
$sql = "SELECT $join_table.*, {$actions_table}.id, {$actions_table}.dataId, {$actions_table}.type as action_table_type, {$actions_table}.user FROM {$actions_table}";
@@ -218,8 +223,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;
|