Pman/Roo.php
[Pman.Base] / Pman / Roo.php
index f9ae3d9..1c85686 100644 (file)
@@ -16,7 +16,7 @@ require_once 'Pman.php';
  * - postListExtra - add extra column data on the results (like new messages etc.)
  * -postListFilter($data, $authUser, $request) return $data - add extra data to an object
  * 
- * - toRooSingleArray($authUser) // single fetch, add data..
+ * - toRooSingleArray($authUser, $request) // single fetch, add data..
  * - toRooArray($request) /// toArray if you need to return different data.. for a list fetch.
  * 
  * 
@@ -478,21 +478,14 @@ class Pman_Roo extends Pman
             if ($lock->find(true)) {
                 // it's locked by someone else..
                 $p = $lock->person();
-                $this->jerr("Your lock is invalid, This record is locked by " . $p->name . " at " $lock->created);
+                $this->jerr("Your lock is invalid, This record is locked by " . $p->name . " at " .$lock->created);
             }
-            // check the users lock..
+            // check the users lock.. - no point.. ??? - if there are no other locks and it's not the users, then they can 
+            // edit it anyways...
             
         }
         
-        
-        if ($lock->find(true)) {
-            if (empty($_REQUEST['_lock_id']) || $lock->id != $_REQUEST['_lock_id']) {
-                
-                $this->jerr("
-                
-            }
-            
-        }
+         
         
         
         
@@ -648,6 +641,9 @@ class Pman_Roo extends Pman
     function loadMap($do, $filter=false, $distinct = false) 
     {
         //DB_DataObject::debugLevel(1);
+        
+         $this->countWhat = false;
+        
         $conf = array();
         
         $this->init();
@@ -660,7 +656,7 @@ class Pman_Roo extends Pman
         //$ff->DB_DataObject['ini_'. $db->database()];
         //echo '<PRE>';print_r($do->links());exit;
         //var_dump($mods);
-        
+        /*
         if (in_array('Builder', $mods) ) {
             
             foreach(in_array('Builder', $mods) ? scandir($this->rootDir.'/Pman') : $mods as $m) {
@@ -679,8 +675,9 @@ class Pman_Roo extends Pman
                 $map = $conf[$do->tableName()];
             } 
         } else {
+            */
             $map = $do->links();
-        }
+        //}
          
         
         
@@ -696,7 +693,7 @@ class Pman_Roo extends Pman
         $do->selectAdd(); // we need thsi as normally it's only cleared by an empty selectAs call.
         
         $selectAs = array(array(  $xx , '%s', false));
-        $this->countWhat = false;
+       
         $has_distinct = false;
         if ($filter || $distinct) {
             $cols = array();