diff options
-rwxr-xr-x | codebase/base_connector.php | 6 | ||||
-rwxr-xr-x | codebase/update.php | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/codebase/base_connector.php b/codebase/base_connector.php index 01a42ce..cb44b15 100755 --- a/codebase/base_connector.php +++ b/codebase/base_connector.php @@ -857,9 +857,9 @@ class Connector { @param url 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"]); + 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")); diff --git a/codebase/update.php b/codebase/update.php index 07c154e..4e73e93 100755 --- a/codebase/update.php +++ b/codebase/update.php @@ -148,6 +148,10 @@ class DataUpdate{ }
protected function select_update($actions_table, $join_table, $id_field_name, $version, $user) {
+
+ if ($this->options["table"] !== false)
+ $join_table = $this->options["table"];
+
$sql = "SELECT $join_table.*, {$actions_table}.id, {$actions_table}.dataId, {$actions_table}.type as action_table_type, {$actions_table}.user FROM {$actions_table}";
$sql .= " LEFT OUTER JOIN {$join_table} ON ";
$sql .= "{$actions_table}.DATAID = {$join_table}.{$id_field_name} ";
|