DataObjects/pman.links.ini
[Pman.Core] / Lock.php
index 7d6848d..a1b091f 100644 (file)
--- a/Lock.php
+++ b/Lock.php
@@ -48,9 +48,12 @@ class Pman_Core_Lock extends Pman
         return true; 
     }
     
-    function get()
+    function get($action)
     {
         // should we allow url links to lock things???
+        // only for debugging??
+        $this->post($action);
+        // 
         $this->jerr("invalid request");
     }
     
@@ -105,15 +108,18 @@ class Pman_Core_Lock extends Pman
         
         $nlocks = $curlock->count() ;
         if ($nlocks && empty($_REQUEST['force'])) {
-            
+           // DB_DataObjecT::debugLevel(1);
             $ar = $curlock->fetchAll('person_id', 'created');
             $p = DB_DataObject::factory('Person');
-            $p->whereAddIn('id', $ar, 'int');
+            $p->selectAdd();
+            $p->selectAdd('id,name,email');
+            
+            $p->whereAddIn('id', array_keys($ar), 'int');
             $p->find();
             $ret = array();
             while ($p->fetch()) {
-                $ret[$p->id] = $p->toRooArray();
-                $ret[$p->id]->lock_created = $ar[$p->id];
+                $ret[$p->id] = $p->toArray();
+                $ret[$p->id]['lock_created'] = $ar[$p->id];
             }
             $this->jok(array_values($ret));