pagination now working, archives working, set comments=false as default
This commit is contained in:
parent
c76aa232bf
commit
d16d523b23
@ -2466,9 +2466,9 @@ class BPlusWalker {
|
|||||||
$testkey = $node->keys[$nextp];
|
$testkey = $node->keys[$nextp];
|
||||||
$keyupper = $this->keyupper;
|
$keyupper = $this->keyupper;
|
||||||
$this->valid =( is_null($keyupper) ||
|
$this->valid =( is_null($keyupper) ||
|
||||||
BPT_keycmp($testkey,$upper)<0||
|
BPT_keycmp($testkey,$keyupper)<0||
|
||||||
#$testkey < $keyupper ||
|
#$testkey < $keyupper ||
|
||||||
($this->includeupper && $testkey == keyupper) );
|
($this->includeupper && $testkey == $keyupper) );
|
||||||
if ($this->valid) $this->node_index = $nextp;
|
if ($this->valid) $this->node_index = $nextp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
var $category = 0;
|
var $category = 0;
|
||||||
var $page = 1;
|
var $page = 1;
|
||||||
var $fullparse = false;
|
var $fullparse = false;
|
||||||
|
var $comments = false;
|
||||||
|
|
||||||
function FPDB_QueryParams($params) {
|
function FPDB_QueryParams($params) {
|
||||||
|
|
||||||
@ -234,7 +235,7 @@
|
|||||||
$qp =& $this->params;
|
$qp =& $this->params;
|
||||||
|
|
||||||
$entry_num = 0;
|
$entry_num = 0;
|
||||||
$this->walker =& $entry_index->walker();
|
|
||||||
|
|
||||||
if (!$qp->y){
|
if (!$qp->y){
|
||||||
// searches the whole index
|
// searches the whole index
|
||||||
@ -242,16 +243,21 @@
|
|||||||
#$this->local_list = array_keys($entry_index);
|
#$this->local_list = array_keys($entry_index);
|
||||||
|
|
||||||
$index_count = $entry_index->length();
|
$index_count = $entry_index->length();
|
||||||
|
$this->walker =& $entry_index->walker();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// notice this won't work with cats (for now)
|
// notice this won't work with cats (for now)
|
||||||
|
|
||||||
$obj =& new entry_archives($qp->y, $qp->m, $qp->d);
|
$obj =& new entry_archives($qp->y, $qp->m, $qp->d);
|
||||||
$filteredkeys = $obj->getList();
|
|
||||||
|
|
||||||
|
$filteredkeys = $obj->getList();
|
||||||
$index_count = $obj->getCount();
|
$index_count = $obj->getCount();
|
||||||
|
|
||||||
|
$this->walker =& $entry_index->walker(
|
||||||
|
entry_idtokey($filteredkeys[0]), true,
|
||||||
|
entry_idtokey($filteredkeys[$index_count-1]), true
|
||||||
|
);
|
||||||
|
|
||||||
$this->local_list =& $filteredkeys;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -472,7 +478,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($this->params->page) {
|
if ($this->params->page) {
|
||||||
if ($this->_getOffsetId(0, ($this->params->start + $this->params->count)))
|
#if ($this->_getOffsetId(0, ($this->params->start + $this->params->count)))
|
||||||
|
if ($this->walker->valid)
|
||||||
return array($GLOBALS['lang']['main']['nextpage'], $this->params->page + 1);
|
return array($GLOBALS['lang']['main']['nextpage'], $this->params->page + 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user