Fixed a pager bug in the next page button when a logstream disk source was used

This bug was a sideeffect due some performance changes made in the last version
This commit is contained in:
Andre Lorbach 2008-09-25 15:45:41 +02:00
parent e6e6687585
commit 918cdcbb69
2 changed files with 11 additions and 6 deletions

View File

@ -530,7 +530,9 @@ class LogStreamDisk extends LogStream {
// Helper variables // Helper variables
$myuid = -1; $myuid = -1;
$counter = 0; $counter = 0;
$tmpOldDirection = $this->_readDirection; $tmpOldDirection = $this->_readDirection; // Store for later use
$tmpuID = $this->_currentOffset+1; // Store for later use
$tmpArray = array();
if ( $this->_sortOrder == EnumSortingOrder::Ascending ) if ( $this->_sortOrder == EnumSortingOrder::Ascending )
{ {
@ -557,12 +559,14 @@ class LogStreamDisk extends LogStream {
// --- Restore reading direction and file position! // --- Restore reading direction and file position!
$this->_readDirection = $tmpOldDirection; $this->_readDirection = $tmpOldDirection;
if ( $this->_readDirection == EnumReadDirection::Forward ) $ret = $this->Read($tmpuID, $tmpArray);
$this->Sseek($myuid, EnumSeek::BOS, 0);
else // if ( $this->_readDirection == EnumReadDirection::Forward )
$this->Sseek($myuid, EnumSeek::EOS, 0); // $this->Sseek($myuid, EnumSeek::BOS, 0);
// else
// $this->Sseek($myuid, EnumSeek::EOS, 0);
// --- // ---
// Return result! // Return result!
return $this->_lastPageUID; return $this->_lastPageUID;
} }

View File

@ -850,6 +850,7 @@ if ( isset($content['Sources'][$currentSourceID]) )
} }
else if ( $content['uid_current'] != UID_UNKNOWN ) else if ( $content['uid_current'] != UID_UNKNOWN )
$content['main_pager_next_found'] = false; $content['main_pager_next_found'] = false;
//echo $content['uid_next'] . "!!!";
} }
// --- // ---