From aa027acf7b056f841d981b8dedcdd27cd8f97300 Mon Sep 17 00:00:00 2001 From: rurban Date: Thu, 24 May 2007 18:40:55 +0000 Subject: [PATCH] display list with tokens problem git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@5695 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/PageList.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/PageList.php b/lib/PageList.php index 80ad0b539..484628216 100644 --- a/lib/PageList.php +++ b/lib/PageList.php @@ -1,4 +1,4 @@ - 1, comma, azhead, ordered (OL lists) * ->supportedArgs() which arguments are supported, so that the plugin * doesn't explictly need to declare it @@ -1239,7 +1239,8 @@ class PageList { $tokens = $this->pagingTokens($count, count($this->_columns), $this->_options['limit']); - $this->_pages = array_slice($this->_pages, $tokens['OFFSET'], $tokens['NUMPAGES']); + if ($tokens) + $this->_pages = array_slice($this->_pages, $tokens['OFFSET'], $tokens['NUMPAGES']); } foreach ($this->_pages as $pagenum => $page) { $rows[] = $this->_renderPageRow($page, $i++); @@ -1341,7 +1342,7 @@ function flipAll(formObj) { // 'azhead' - support

grouping into initials // 'ordered' - OL or UL list (not yet inherited to all plugins) // 'comma' - condensed comma-list only, 1: no links, >1: with links - // TODO: only unique list entries, esp. with nopage + // FIXME: only unique list entries, esp. with nopage function _generateList($caption='') { if (empty($this->_pages)) return; // stop recursion $out = HTML(); @@ -1453,6 +1454,7 @@ function flipAll(formObj) { // comma=1 // Condense list without a href links: "Page1, Page2, ..." // Alternative $seperator = HTML::Raw(' · ') + // FIXME: only unique list entries, esp. with nopage function _generateCommaListAsString() { if (defined($this->_options['commasep'])) $seperator = $this->_options['commasep']; @@ -1470,6 +1472,7 @@ function flipAll(formObj) { // Normal WikiLink list. // Future: 1 = reserved for plain string (see above) // 2 and more => HTML link specialization? + // FIXME: only unique list entries, esp. with nopage function _generateCommaList($style = false) { if (defined($this->_options['commasep'])) $seperator = HTLM::Raw($this->_options['commasep']); @@ -1528,6 +1531,9 @@ extends PageList { } // $Log: not supported by cvs2svn $ +// Revision 1.140 2007/05/13 18:12:55 rurban +// force adding a options[type] column: fixes LinkDatabase +// // Revision 1.139 2007/01/25 07:42:01 rurban // Support nopage // -- 2.45.0