From c6de4a4f633eeea8ad989c283449e41edd74e90d Mon Sep 17 00:00:00 2001 From: Andre Lorbach Date: Wed, 18 Feb 2015 15:46:48 +0100 Subject: [PATCH] Removed broken Page Number display support. For mysql and mongodb, page number calculation needs to be rewritten. --- src/classes/logstreamdb.class.php | 4 ++-- src/classes/logstreammongodb.class.php | 4 ++-- src/index.php | 2 +- src/js/common.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/classes/logstreamdb.class.php b/src/classes/logstreamdb.class.php index 026f007..00bc934 100644 --- a/src/classes/logstreamdb.class.php +++ b/src/classes/logstreamdb.class.php @@ -58,7 +58,7 @@ class LogStreamDB extends LogStream { private $_previousPageUID = -1; private $_lastPageUID = -1; private $_firstPageUID = -1; - private $_currentPageNumber = 0; + private $_currentPageNumber = -1; private $_SQLwhereClause = ""; private $_myDBQuery = null; @@ -106,7 +106,7 @@ class LogStreamDB extends LogStream { return $res; // Success, this means we init the Pagenumber to ONE! - $this->_currentPageNumber = 1; + // $this->_currentPageNumber = 1; // reached this point means success! return SUCCESS; diff --git a/src/classes/logstreammongodb.class.php b/src/classes/logstreammongodb.class.php index 1ad0983..6678744 100644 --- a/src/classes/logstreammongodb.class.php +++ b/src/classes/logstreammongodb.class.php @@ -56,7 +56,7 @@ class LogStreamMongoDB extends LogStream { private $_previousPageUID = -1; private $_lastPageUID = -1; private $_firstPageUID = -1; - private $_currentPageNumber = 0; + private $_currentPageNumber = -1; private $_SQLwhereClause = ""; private $_myDBQuery = null; @@ -113,7 +113,7 @@ class LogStreamMongoDB extends LogStream { // return $res; // Success, this means we init the Pagenumber to ONE! - $this->_currentPageNumber = 1; +// $this->_currentPageNumber = 1; // reached this point means success! return SUCCESS; diff --git a/src/index.php b/src/index.php index 983e708..9b6c749 100644 --- a/src/index.php +++ b/src/index.php @@ -316,7 +316,7 @@ if ( isset($content['Sources'][$currentSourceID]) ) $content['main_recordcount_found'] = false; $content['main_currentpagenumber'] = $stream->GetCurrentPageNumber(); - if ( $content['main_currentpagenumber'] >= 0 ) + if ( $content['main_currentpagenumber'] > 0 ) $content['main_currentpagenumber_found'] = true; else $content['main_currentpagenumber_found'] = false; diff --git a/src/js/common.js b/src/js/common.js index 0ab051a..1ad5ddb 100644 --- a/src/js/common.js +++ b/src/js/common.js @@ -435,7 +435,7 @@ function CreateMenuFunction ( szbuttonobjid, szmenuobjid, bHide ) { // Popup Menu Code var menu = $("ul" + szmenuobjid).menu(); - + if (bHide) { // Hide menu.hide();