summaryrefslogtreecommitdiffstats
path: root/codebase/update.php
diff options
context:
space:
mode:
authorStanislau Wolski <stanislau.wolski@gmail.com>2016-01-14 18:10:58 +0300
committerStanislau Wolski <stanislau.wolski@gmail.com>2016-01-14 18:10:58 +0300
commit4a75329e2b743ece62d47439e8a1cfc1048e82cd (patch)
tree2b8f9d5f6754cc62000c40cd4401a22590d7d61c /codebase/update.php
parent709f7d2b048d2ad548b5f4d5fba43759e8c00283 (diff)
parentd6cc2827e356b4803d48bf66d1d95ddfb453343c (diff)
downloadconnector-php-4a75329e2b743ece62d47439e8a1cfc1048e82cd.zip
connector-php-4a75329e2b743ece62d47439e8a1cfc1048e82cd.tar.gz
connector-php-4a75329e2b743ece62d47439e8a1cfc1048e82cd.tar.bz2
Merge pull request #10 from slothfk/master
corrected live_update encoding
Diffstat (limited to 'codebase/update.php')
-rwxr-xr-xcodebase/update.php23
1 files changed, 14 insertions, 9 deletions
diff --git a/codebase/update.php b/codebase/update.php
index 9ef12ac..07c154e 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;
@@ -342,4 +347,4 @@ class JSONDataUpdate extends DataUpdate {
}
-?> \ No newline at end of file
+?>