@@ -104,12 +104,13 @@ class DataUpdate{
104
104
105
105
protected $ table ; //!< table , where actions are stored
106
106
protected $ url ; //!< url for notification service, optional
107
- protected $ sql ; //!< DB wrapper object
108
- protected $ config ; //!< DBConfig object
109
- protected $ request ; //!< DBRequestConfig object
110
- protected $ event ;
111
- protected $ item_class ;
112
- protected $ demu ;
107
+ protected $ sql ; //!< DB wrapper object
108
+ protected $ config ; //!< DBConfig object
109
+ protected $ request ; //!< DBRequestConfig object
110
+ protected $ encoding ="utf-8 " ;
111
+ protected $ event ;
112
+ protected $ item_class ;
113
+ protected $ demu ;
113
114
114
115
//protected $config;//!< DataConfig instance
115
116
//protected $request;//!< DataRequestConfig instance
@@ -141,6 +142,10 @@ public function set_event($master, $name){
141
142
$ this ->event = $ master ;
142
143
$ this ->item_class = $ name ;
143
144
}
145
+
146
+ public function set_encoding ($ encoding ){
147
+ $ this ->encoding = $ encoding ;
148
+ }
144
149
145
150
protected function select_update ($ actions_table , $ join_table , $ id_field_name , $ version , $ user ) {
146
151
$ 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 @@ public function get_updates() {
218
223
$ output = $ this ->render_set ($ this ->sql ->select ($ sub_request ), $ this ->item_class );
219
224
220
225
ob_clean ();
221
- header ("Content-type:text/xml " );
222
-
226
+ header("Content-type:text/xml; charset= " . $ this -> encoding ; );
227
+
223
228
echo $ this ->updates_start ();
224
229
echo $ this ->get_version ();
225
230
echo $ output ;
0 commit comments