summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcodebase/base_connector.php4
-rwxr-xr-xcodebase/update.php4
2 files changed, 6 insertions, 2 deletions
diff --git a/codebase/base_connector.php b/codebase/base_connector.php
index 4e033b2..aa77491 100755
--- a/codebase/base_connector.php
+++ b/codebase/base_connector.php
@@ -854,8 +854,8 @@ 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));
+ 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->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 9ef12ac..aa98270 100755
--- a/codebase/update.php
+++ b/codebase/update.php
@@ -143,6 +143,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} ";