From: Alan Knowles Date: Mon, 26 Sep 2011 05:39:28 +0000 (+0800) Subject: Lock.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=84ce7af846d302d19025870107565a438000e90b Lock.php --- diff --git a/Lock.php b/Lock.php index 0e8e6f32..d9a99f58 100644 --- a/Lock.php +++ b/Lock.php @@ -106,8 +106,11 @@ class Pman_Core_Lock extends Pman 'on_table' => $_REQUEST['on_table'] )); + $curlock_ex = clone($curlock); + $curlock_ex->whereAdd('person_id != '. $this->authUser->id); - $nlocks = $curlock->count() ; + + $nlocks = $curlock_ex->count() ; if ($nlocks && empty($_REQUEST['force'])) { // DB_DataObjecT::debugLevel(1); $ar = $curlock->fetchAll('person_id', 'created'); @@ -125,6 +128,7 @@ class Pman_Core_Lock extends Pman $this->jok(array_values($ret)); } + $nlocks = $curlock->count(); if ($nlocks) { // trash all the locks.. $curlock->find();