File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,11 @@ class dbObject {
8787 * @var int
8888 */
8989 public static $ totalPages = 0 ;
90+ /**
91+ * Variable which holds an amount of returned rows during paginate queries
92+ * @var string
93+ */
94+ public static $ totalCount = 0 ;
9095 /**
9196 * An array that holds insert/update/select errors
9297 *
@@ -472,8 +477,11 @@ protected function count () {
472477 */
473478 private function paginate ($ page , $ fields = null ) {
474479 $ this ->db ->pageLimit = self ::$ pageLimit ;
480+ $ objects = Array ();
481+ $ this ->processHasOneWith ();
475482 $ res = $ this ->db ->paginate ($ this ->dbTable , $ page , $ fields );
476483 self ::$ totalPages = $ this ->db ->totalPages ;
484+ self ::$ totalCount = $ this ->db ->totalCount ;
477485 if ($ this ->db ->count == 0 ) return null ;
478486
479487 foreach ($ res as $ k => &$ r ) {
You can’t perform that action at this time.
0 commit comments