using a fake total - we really need to move 'fast' searching (using ids) into Roo...
[Pman.Base] / Pman / Roo.php
index a9871a0..83bf522 100644 (file)
@@ -273,6 +273,9 @@ class Pman_Roo extends Pman
         if (!isset($_REQUEST['_no_count'])) {
             $total = $xx->count($this->countWhat);
         }
+        if (isset($xx->_real_total)) { // this is used when we subquery the search.
+            $total = $xx->_real_total;
+        }
         // sorting..
       //   
         // var_dump($total);exit;
@@ -343,7 +346,7 @@ class Pman_Roo extends Pman
         
         // filter results, and add any data that is needed...
         if (method_exists($x,'postListFilter')) {
-            $ret = $x->postListFilter($ret, $this->authUser, $_REQUEST);
+            $ret = $x->postListFilter($ret, $this->authUser, $_REQUEST, $this);
         }
         
         
@@ -931,7 +934,7 @@ class Pman_Roo extends Pman
         }
 
         if ( $with_perm_check &&  !$this->checkPerm($x,'A', $req))  {
-            $this->jerr("PERMISSION DENIED (i)");
+            $this->jerr("PERMISSION DENIED {$x->tableName()}:checkPerm(A)");
         }
         $cols = $x->tableColumns();