From f2bd3442ec0de2b312208621d58199ae7de1ff6c Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 12 May 2021 15:48:42 +0800 Subject: [PATCH] Changed DataObjects/Events.phpPman.Lock.js --- DataObjects/Events.php | 6 +++--- Pman.Lock.js | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/DataObjects/Events.php b/DataObjects/Events.php index 2da22c6d..f90debf1 100644 --- a/DataObjects/Events.php +++ b/DataObjects/Events.php @@ -54,7 +54,6 @@ class Pman_Core_DataObjects_Events extends DB_DataObject $this->selectAs(); $this->selectAs($jt, 'person_id_%s', 'join_person_id_id'); - if (method_exists($jt,'nameColumn')) { $this->selectAdd("join_person_id_id.{$jt->nameColumn()} as person_id_name"); } @@ -150,7 +149,7 @@ class Pman_Core_DataObjects_Events extends DB_DataObject //DB_DataObject::DebugLevel(1); $joins = explode(',',$q['_join']); - $this->selectAdd(); // ??? + //$this->selectAdd(); // ??? << this wipes out the default options $distinct = false; foreach($joins as $t) { @@ -160,7 +159,8 @@ class Pman_Core_DataObjects_Events extends DB_DataObject continue; } $jtn = $x->tableName(); - $jk = array_shift($x->keys()); + $jks = $x->keys(); + $jk = array_shift($jks); $this->_join .= " LEFT JOIN {$jtn} as join_on_id_{$jtn} ON {$tn}.on_id = join_on_id_{$jtn}.{$jk} diff --git a/Pman.Lock.js b/Pman.Lock.js index b44696d7..9636ada9 100644 --- a/Pman.Lock.js +++ b/Pman.Lock.js @@ -97,11 +97,12 @@ Roo.apply(Pman.Lock.prototype, { }, - unlock : function() { + unlock : function(id) { + id = id || this.id; new Pman.Request({ url : baseURL + '/Core/Lock/unlock', params : { - id : this.id + id : id }, failure : function() { Roo.MessageBox.alert("Error", "UnLock Request failed, you may get a warning when trying to edit again"); -- 2.39.2