From 803f58b7ecc7b77449991566fa793f7affd09f47 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Fri, 16 Mar 2012 14:38:21 +0800 Subject: [PATCH] Lock.php --- Lock.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Lock.php b/Lock.php index f49338a7..25590df0 100644 --- a/Lock.php +++ b/Lock.php @@ -105,12 +105,13 @@ class Pman_Core_Lock extends Pman 'on_id' => $_REQUEST['on_id'], 'on_table' => strtolower($_REQUEST['on_table']) )); - + $curlock->person_id = $this->authUser->id; $curlock_ex = clone($curlock); $curlock_ex->whereAdd('person_id != '. $this->authUser->id); + $nlocks = $curlock_ex->count() ; + $ret = false; - $nlocks = $curlock_ex->count() ; if ($nlocks && empty($_REQUEST['force'])) { // DB_DataObjecT::debugLevel(1); $ar = $curlock->fetchAll('person_id', 'created'); @@ -125,7 +126,8 @@ class Pman_Core_Lock extends Pman $ret[$p->id] = $p->toArray(); $ret[$p->id]['lock_created'] = $ar[$p->id]; } - $this->jok(array_values($ret)); + $ret = array_values($ret); + //$this->jok(array_values($ret)); } // trash the lock if it belongs to current user.. -- 2.39.2