projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bcec861
)
Lock.php
author
Alan Knowles
<alan@akbkhome.com>
Mon, 26 Sep 2011 05:39:28 +0000
(13:39 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Mon, 26 Sep 2011 05:39:28 +0000
(13:39 +0800)
Lock.php
patch
|
blob
|
history
diff --git
a/Lock.php
b/Lock.php
index
0e8e6f3
..
d9a99f5
100644
(file)
--- a/
Lock.php
+++ b/
Lock.php
@@
-106,8
+106,11
@@
class Pman_Core_Lock extends Pman
'on_table' => $_REQUEST['on_table']
));
'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');
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));
}
$this->jok(array_values($ret));
}
+ $nlocks = $curlock->count();
if ($nlocks) {
// trash all the locks..
$curlock->find();
if ($nlocks) {
// trash all the locks..
$curlock->find();