Paolo Libertini пре 6 година
родитељ
комит
b9aac89397
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      lib/Mooses/AbstractMongo.php

+ 2 - 2
lib/Mooses/AbstractMongo.php

@@ -240,7 +240,7 @@ class Mooses_AbstractMongo extends Mooses_Mongodb_Mongo_Document {
      * @throws MongoCursorException
      * @throws Mooses_Mongodb_Mongo_Exception
      */
-    protected static function fetchAllWithLimits($_pageLimit, $_pageSize){
+    protected static function fetchAllWithLimits($query, array $fields, $_pageLimit, $_pageSize){
         $inheritance = static::getCollectionInheritance();
         if (count($inheritance) > 1) {
             $query['_type'] = $inheritance[0];
@@ -265,7 +265,7 @@ class Mooses_AbstractMongo extends Mooses_Mongodb_Mongo_Document {
 
     protected function ___getCollectionData($_forceArray = true){
         if($this->_pageLimit !== false && $this->_page !== false) {
-            $_result = self::fetchAllWithLimits($this->_pageLimit, $this->_page);
+            $_result = self::fetchAllWithLimits($this->_queryConditions, $this->_fields, $this->_pageLimit, $this->_page);
         } else {
             $_result = $this->fetchAll($this->_queryConditions, $this->_fields);
         }