Subversion Repositories Applications.papyrus

Rev

Rev 848 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 848 Rev 1713
1
<?php
1
<?php
2
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
2
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
 
3
 
4
/**
4
/**
5
 * Contains the Pager_Sliding class
5
 * Contains the Pager_Sliding class
6
 *
6
 *
7
 * PHP versions 4 and 5
7
 * PHP versions 4 and 5
8
 *
8
 *
9
 * LICENSE: Redistribution and use in source and binary forms, with or without
9
 * LICENSE: Redistribution and use in source and binary forms, with or without
10
 * modification, are permitted provided that the following conditions are met:
10
 * modification, are permitted provided that the following conditions are met:
11
 * 1. Redistributions of source code must retain the above copyright
11
 * 1. Redistributions of source code must retain the above copyright
12
 *    notice, this list of conditions and the following disclaimer.
12
 *    notice, this list of conditions and the following disclaimer.
13
 * 2. Redistributions in binary form must reproduce the above copyright
13
 * 2. Redistributions in binary form must reproduce the above copyright
14
 *    notice, this list of conditions and the following disclaimer in the
14
 *    notice, this list of conditions and the following disclaimer in the
15
 *    documentation and/or other materials provided with the distribution.
15
 *    documentation and/or other materials provided with the distribution.
16
 * 3. The name of the author may not be used to endorse or promote products
16
 * 3. The name of the author may not be used to endorse or promote products
17
 *    derived from this software without specific prior written permission.
17
 *    derived from this software without specific prior written permission.
18
 *
18
 *
19
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
19
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
20
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
20
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22
 * IN NO EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY
22
 * IN NO EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY
23
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
 *
29
 *
30
 * @category   HTML
30
 * @category   HTML
31
 * @package    Pager
31
 * @package    Pager
32
 * @author     Lorenzo Alberton <l dot alberton at quipo dot it>
32
 * @author     Lorenzo Alberton <l dot alberton at quipo dot it>
33
 * @copyright  2003-2006 Lorenzo Alberton
33
 * @copyright  2003-2006 Lorenzo Alberton
34
 * @license    http://www.debian.org/misc/bsd.license  BSD License (3 Clause)
34
 * @license    http://www.debian.org/misc/bsd.license  BSD License (3 Clause)
35
 * @version    CVS: $Id$
35
 * @version    CVS: $Id$
36
 * @link       http://pear.php.net/package/Pager
36
 * @link       http://pear.php.net/package/Pager
37
 */
37
 */
38
 
38
 
39
/**
39
/**
40
 * require PEAR::Pager_Common base class
40
 * require PEAR::Pager_Common base class
41
 */
41
 */
42
require_once 'Pager/Common.php';
42
require_once 'Pager/Common.php';
43
 
43
 
44
/**
44
/**
45
 * Pager_Sliding - Generic data paging class  ("sliding window" style)
45
 * Pager_Sliding - Generic data paging class  ("sliding window" style)
46
 * Usage examples can be found in the PEAR manual
46
 * Usage examples can be found in the PEAR manual
47
 *
47
 *
48
 * @category   HTML
48
 * @category   HTML
49
 * @package    Pager
49
 * @package    Pager
50
 * @author     Lorenzo Alberton <l dot alberton at quipo dot it>
50
 * @author     Lorenzo Alberton <l dot alberton at quipo dot it>
51
 * @copyright  2003-2005 Lorenzo Alberton
51
 * @copyright  2003-2005 Lorenzo Alberton
52
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
52
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
53
 * @link       http://pear.php.net/package/Pager
53
 * @link       http://pear.php.net/package/Pager
54
 */
54
 */
55
class Pager_Sliding extends Pager_Common
55
class Pager_Sliding extends Pager_Common
56
{
56
{
57
    // {{{ Pager_Sliding()
57
    // {{{ Pager_Sliding()
58
 
58
 
59
    /**
59
    /**
60
     * Constructor
60
     * Constructor
61
     *
61
     *
62
     * @param array $options    An associative array of option names
62
     * @param array $options    An associative array of option names
63
     *                          and their values
63
     *                          and their values
64
     * @access public
64
     * @access public
65
     */
65
     */
66
    function Pager_Sliding($options = array())
66
    function Pager_Sliding($options = array())
67
    {
67
    {
68
        //set default Pager_Sliding options
68
        //set default Pager_Sliding options
69
        $this->_delta                 = 2;
69
        $this->_delta                 = 2;
70
        $this->_prevImg               = '&laquo;';
70
        $this->_prevImg               = '&laquo;';
71
        $this->_nextImg               = '&raquo;';
71
        $this->_nextImg               = '&raquo;';
72
        $this->_separator             = '|';
72
        $this->_separator             = '|';
73
        $this->_spacesBeforeSeparator = 3;
73
        $this->_spacesBeforeSeparator = 3;
74
        $this->_spacesAfterSeparator  = 3;
74
        $this->_spacesAfterSeparator  = 3;
75
        $this->_curPageSpanPre        = '<b><u>';
75
        $this->_curPageSpanPre        = '<b><u>';
76
        $this->_curPageSpanPost       = '</u></b>';
76
        $this->_curPageSpanPost       = '</u></b>';
77
 
77
 
78
        //set custom options
78
        //set custom options
79
        $err = $this->setOptions($options);
79
        $err = $this->setOptions($options);
80
        if ($err !== PAGER_OK) {
80
        if ($err !== PAGER_OK) {
81
            return $this->raiseError($this->errorMessage($err), $err);
81
            return $this->raiseError($this->errorMessage($err), $err);
82
        }
82
        }
83
        $this->build();
83
        $this->build();
84
    }
84
    }
85
 
85
 
86
    // }}}
86
    // }}}
87
    // {{{ build()
-
 
88
 
-
 
89
    /**
-
 
90
     * Generate or refresh the links and paged data after a call to setOptions()
-
 
91
     *
-
 
92
     * @access public
-
 
93
     */
-
 
94
    function build()
-
 
95
    {
-
 
96
        //reset
-
 
97
        $this->_pageData = array();
-
 
98
        $this->links = '';
-
 
99
 
-
 
100
        $this->_generatePageData();
-
 
101
        $this->_setFirstLastText();
-
 
102
 
-
 
103
        if ($this->_totalPages > (2 * $this->_delta + 1)) {
-
 
104
            $this->links .= $this->_printFirstPage();
-
 
105
        }
-
 
106
 
-
 
107
        $this->links .= $this->_getBackLink();
-
 
108
        $this->links .= $this->_getPageLinks();
-
 
109
        $this->links .= $this->_getNextLink();
-
 
110
 
-
 
111
        $this->linkTags .= $this->_getFirstLinkTag();
-
 
112
        $this->linkTags .= $this->_getPrevLinkTag();
-
 
113
        $this->linkTags .= $this->_getNextLinkTag();
-
 
114
        $this->linkTags .= $this->_getLastLinkTag();
-
 
115
 
-
 
116
        if ($this->_totalPages > (2 * $this->_delta + 1)) {
-
 
117
            $this->links .= $this->_printLastPage();
-
 
118
        }
-
 
119
    }
-
 
120
 
-
 
121
    // }}}
-
 
122
    // {{{ getPageIdByOffset()
87
    // {{{ getPageIdByOffset()
123
 
88
 
124
    /**
89
    /**
125
     * "Overload" PEAR::Pager method. VOID. Not needed here...
90
     * "Overload" PEAR::Pager method. VOID. Not needed here...
126
     * @param integer $index Offset to get pageID for
91
     * @param integer $index Offset to get pageID for
127
     * @deprecated
92
     * @deprecated
128
     * @access public
93
     * @access public
129
     */
94
     */
130
    function getPageIdByOffset($index=null) { }
95
    function getPageIdByOffset($index=null) { }
131
 
96
 
132
    // }}}
97
    // }}}
133
    // {{{ getPageRangeByPageId()
98
    // {{{ getPageRangeByPageId()
134
 
99
 
135
    /**
100
    /**
136
     * Given a PageId, it returns the limits of the range of pages displayed.
101
     * Given a PageId, it returns the limits of the range of pages displayed.
137
     * While getOffsetByPageId() returns the offset of the data within the
102
     * While getOffsetByPageId() returns the offset of the data within the
138
     * current page, this method returns the offsets of the page numbers interval.
103
     * current page, this method returns the offsets of the page numbers interval.
139
     * E.g., if you have pageId=5 and delta=2, it will return (3, 7).
104
     * E.g., if you have pageId=5 and delta=2, it will return (3, 7).
140
     * PageID of 9 would give you (4, 8).
105
     * PageID of 9 would give you (4, 8).
141
     * If the method is called without parameter, pageID is set to currentPage#.
106
     * If the method is called without parameter, pageID is set to currentPage#.
142
     *
107
     *
143
     * @param integer PageID to get offsets for
108
     * @param integer PageID to get offsets for
144
     * @return array  First and last offsets
109
     * @return array  First and last offsets
145
     * @access public
110
     * @access public
146
     */
111
     */
147
    function getPageRangeByPageId($pageid = null)
112
    function getPageRangeByPageId($pageid = null)
148
    {
113
    {
149
        $pageid = isset($pageid) ? (int)$pageid : $this->_currentPage;
114
        $pageid = isset($pageid) ? (int)$pageid : $this->_currentPage;
150
        if (!isset($this->_pageData)) {
115
        if (!isset($this->_pageData)) {
151
            $this->_generatePageData();
116
            $this->_generatePageData();
152
        }
117
        }
153
        if (isset($this->_pageData[$pageid]) || is_null($this->_itemData)) {
118
        if (isset($this->_pageData[$pageid]) || is_null($this->_itemData)) {
154
            if ($this->_expanded) {
119
            if ($this->_expanded) {
155
                $min_surplus = ($pageid <= $this->_delta) ? ($this->_delta - $pageid + 1) : 0;
120
                $min_surplus = ($pageid <= $this->_delta) ? ($this->_delta - $pageid + 1) : 0;
156
                $max_surplus = ($pageid >= ($this->_totalPages - $this->_delta)) ?
121
                $max_surplus = ($pageid >= ($this->_totalPages - $this->_delta)) ?
157
                                ($pageid - ($this->_totalPages - $this->_delta)) : 0;
122
                                ($pageid - ($this->_totalPages - $this->_delta)) : 0;
158
            } else {
123
            } else {
159
                $min_surplus = $max_surplus = 0;
124
                $min_surplus = $max_surplus = 0;
160
            }
125
            }
161
            return array(
126
            return array(
162
                max($pageid - $this->_delta - $max_surplus, 1),
127
                max($pageid - $this->_delta - $max_surplus, 1),
163
                min($pageid + $this->_delta + $min_surplus, $this->_totalPages)
128
                min($pageid + $this->_delta + $min_surplus, $this->_totalPages)
164
            );
129
            );
165
        }
130
        }
166
        return array(0, 0);
131
        return array(0, 0);
167
    }
132
    }
168
 
133
 
169
    // }}}
134
    // }}}
170
    // {{{ getLinks()
135
    // {{{ getLinks()
171
 
136
 
172
    /**
137
    /**
173
     * Returns back/next/first/last and page links,
138
     * Returns back/next/first/last and page links,
174
     * both as ordered and associative array.
139
     * both as ordered and associative array.
175
     *
140
     *
176
     * @param integer $pageID Optional pageID. If specified, links
141
     * @param integer $pageID Optional pageID. If specified, links
177
     *                for that page are provided instead of current one.
142
     *                for that page are provided instead of current one.
178
     * @return array back/pages/next/first/last/all links
143
     * @return array back/pages/next/first/last/all links
179
     * @access public
144
     * @access public
180
     */
145
     */
181
    function getLinks($pageID = null)
146
    function getLinks($pageID = null)
182
    {
147
    {
183
        if ($pageID != null) {
148
        if ($pageID != null) {
184
            $_sav = $this->_currentPage;
149
            $_sav = $this->_currentPage;
185
            $this->_currentPage = $pageID;
150
            $this->_currentPage = $pageID;
186
 
151
 
187
            $this->links = '';
152
            $this->links = '';
188
            if ($this->_totalPages > (2 * $this->_delta + 1)) {
153
            if ($this->_totalPages > (2 * $this->_delta + 1)) {
189
                $this->links .= $this->_printFirstPage();
154
                $this->links .= $this->_printFirstPage();
190
            }
155
            }
191
            $this->links .= $this->_getBackLink();
156
            $this->links .= $this->_getBackLink();
192
            $this->links .= $this->_getPageLinks();
157
            $this->links .= $this->_getPageLinks();
193
            $this->links .= $this->_getNextLink();
158
            $this->links .= $this->_getNextLink();
194
            if ($this->_totalPages > (2 * $this->_delta + 1)) {
159
            if ($this->_totalPages > (2 * $this->_delta + 1)) {
195
                $this->links .= $this->_printLastPage();
160
                $this->links .= $this->_printLastPage();
196
            }
161
            }
197
        }
162
        }
198
 
163
 
199
        $back  = str_replace('&nbsp;', '', $this->_getBackLink());
164
        $back  = str_replace('&nbsp;', '', $this->_getBackLink());
200
        $next  = str_replace('&nbsp;', '', $this->_getNextLink());
165
        $next  = str_replace('&nbsp;', '', $this->_getNextLink());
201
        $pages = $this->_getPageLinks();
166
        $pages = $this->_getPageLinks();
202
        $first = $this->_printFirstPage();
167
        $first = $this->_printFirstPage();
203
        $last  = $this->_printLastPage();
168
        $last  = $this->_printLastPage();
204
        $all   = $this->links;
169
        $all   = $this->links;
205
        $linkTags = $this->linkTags;
170
        $linkTags = $this->linkTags;
206
 
171
 
207
        if ($pageID != null) {
172
        if ($pageID != null) {
208
            $this->_currentPage = $_sav;
173
            $this->_currentPage = $_sav;
209
        }
174
        }
210
 
175
 
211
        return array(
176
        return array(
212
            $back,
177
            $back,
213
            $pages,
178
            $pages,
214
            trim($next),
179
            trim($next),
215
            $first,
180
            $first,
216
            $last,
181
            $last,
217
            $all,
182
            $all,
218
            $linkTags,
183
            $linkTags,
219
            'back'  => $back,
184
            'back'  => $back,
220
            'pages' => $pages,
185
            'pages' => $pages,
221
            'next'  => $next,
186
            'next'  => $next,
222
            'first' => $first,
187
            'first' => $first,
223
            'last'  => $last,
188
            'last'  => $last,
224
            'all'   => $all,
189
            'all'   => $all,
225
            'linktags' => $linkTags
190
            'linktags' => $linkTags
226
        );
191
        );
227
    }
192
    }
228
 
193
 
229
    // }}}
194
    // }}}
230
    // {{{ _getPageLinks()
195
    // {{{ _getPageLinks()
231
 
196
 
232
    /**
197
    /**
233
     * Returns pages link
198
     * Returns pages link
234
     *
199
     *
235
     * @return string Links
200
     * @return string Links
236
     * @access private
201
     * @access private
237
     */
202
     */
238
    function _getPageLinks($url = '')
203
    function _getPageLinks($url = '')
239
    {
204
    {
240
        //legacy setting... the preferred way to set an option now
205
        //legacy setting... the preferred way to set an option now
241
        //is adding it to the constuctor
206
        //is adding it to the constuctor
242
        if (!empty($url)) {
207
        if (!empty($url)) {
243
            $this->_path = $url;
208
            $this->_path = $url;
244
        }
209
        }
245
        
210
        
246
        //If there's only one page, don't display links
211
        //If there's only one page, don't display links
247
        if ($this->_clearIfVoid && ($this->_totalPages < 2)) {
212
        if ($this->_clearIfVoid && ($this->_totalPages < 2)) {
248
            return '';
213
            return '';
249
        }
214
        }
250
 
215
 
251
        $links = '';
216
        $links = '';
252
        if ($this->_totalPages > (2 * $this->_delta + 1)) {
217
        if ($this->_totalPages > (2 * $this->_delta + 1)) {
253
            if ($this->_expanded) {
218
            if ($this->_expanded) {
254
                if (($this->_totalPages - $this->_delta) <= $this->_currentPage) {
219
                if (($this->_totalPages - $this->_delta) <= $this->_currentPage) {
255
                    $expansion_before = $this->_currentPage - ($this->_totalPages - $this->_delta);
220
                    $expansion_before = $this->_currentPage - ($this->_totalPages - $this->_delta);
256
                } else {
221
                } else {
257
                    $expansion_before = 0;
222
                    $expansion_before = 0;
258
                }
223
                }
259
                for ($i = $this->_currentPage - $this->_delta - $expansion_before; $expansion_before; $expansion_before--, $i++) {
224
                for ($i = $this->_currentPage - $this->_delta - $expansion_before; $expansion_before; $expansion_before--, $i++) {
260
                    $print_separator_flag = ($i != $this->_currentPage + $this->_delta); // && ($i != $this->_totalPages - 1)
225
                    $print_separator_flag = ($i != $this->_currentPage + $this->_delta); // && ($i != $this->_totalPages - 1)
261
                    
226
                    
262
                    $this->range[$i] = false;
227
                    $this->range[$i] = false;
263
                    $this->_linkData[$this->_urlVar] = $i;
228
                    $this->_linkData[$this->_urlVar] = $i;
264
                    $links .= $this->_renderLink($this->_altPage.' '.$i, $i)
229
                    $links .= $this->_renderLink($this->_altPage.' '.$i, $i)
265
                           . $this->_spacesBefore
230
                           . $this->_spacesBefore
266
                           . ($print_separator_flag ? $this->_separator.$this->_spacesAfter : '');
231
                           . ($print_separator_flag ? $this->_separator.$this->_spacesAfter : '');
267
                }
232
                }
268
            }
233
            }
269
 
234
 
270
            $expansion_after = 0;
235
            $expansion_after = 0;
271
            for ($i = $this->_currentPage - $this->_delta; ($i <= $this->_currentPage + $this->_delta) && ($i <= $this->_totalPages); $i++) {
236
            for ($i = $this->_currentPage - $this->_delta; ($i <= $this->_currentPage + $this->_delta) && ($i <= $this->_totalPages); $i++) {
272
                if ($i < 1) {
237
                if ($i < 1) {
273
                    ++$expansion_after;
238
                    ++$expansion_after;
274
                    continue;
239
                    continue;
275
                }
240
                }
276
 
241
 
277
                // check when to print separator
242
                // check when to print separator
278
                $print_separator_flag = (($i != $this->_currentPage + $this->_delta) && ($i != $this->_totalPages));
243
                $print_separator_flag = (($i != $this->_currentPage + $this->_delta) && ($i != $this->_totalPages));
279
 
244
 
280
                if ($i == $this->_currentPage) {
245
                if ($i == $this->_currentPage) {
281
                    $this->range[$i] = true;
246
                    $this->range[$i] = true;
282
                    $links .= $this->_curPageSpanPre . $i . $this->_curPageSpanPost;
247
                    $links .= $this->_curPageSpanPre . $i . $this->_curPageSpanPost;
283
                } else {
248
                } else {
284
                    $this->range[$i] = false;
249
                    $this->range[$i] = false;
285
                    $this->_linkData[$this->_urlVar] = $i;
250
                    $this->_linkData[$this->_urlVar] = $i;
286
                    $links .= $this->_renderLink($this->_altPage.' '.$i, $i);
251
                    $links .= $this->_renderLink($this->_altPage.' '.$i, $i);
287
                }
252
                }
288
                $links .= $this->_spacesBefore
253
                $links .= $this->_spacesBefore
289
                        . ($print_separator_flag ? $this->_separator.$this->_spacesAfter : '');
254
                        . ($print_separator_flag ? $this->_separator.$this->_spacesAfter : '');
290
            }
255
            }
291
 
256
 
292
            if ($this->_expanded && $expansion_after) {
257
            if ($this->_expanded && $expansion_after) {
293
                $links .= $this->_separator . $this->_spacesAfter;
258
                $links .= $this->_separator . $this->_spacesAfter;
294
                for ($i = $this->_currentPage + $this->_delta +1; $expansion_after; $expansion_after--, $i++) {
259
                for ($i = $this->_currentPage + $this->_delta +1; $expansion_after; $expansion_after--, $i++) {
295
                    $print_separator_flag = ($expansion_after != 1);
260
                    $print_separator_flag = ($expansion_after != 1);
296
                    $this->range[$i] = false;
261
                    $this->range[$i] = false;
297
                    $this->_linkData[$this->_urlVar] = $i;
262
                    $this->_linkData[$this->_urlVar] = $i;
298
                    $links .= $this->_renderLink($this->_altPage.' '.$i, $i)
263
                    $links .= $this->_renderLink($this->_altPage.' '.$i, $i)
299
                      . $this->_spacesBefore
264
                      . $this->_spacesBefore
300
                      . ($print_separator_flag ? $this->_separator.$this->_spacesAfter : '');
265
                      . ($print_separator_flag ? $this->_separator.$this->_spacesAfter : '');
301
                }
266
                }
302
            }
267
            }
303
 
268
 
304
        } else {
269
        } else {
305
            //if $this->_totalPages <= (2*Delta+1) show them all
270
            //if $this->_totalPages <= (2*Delta+1) show them all
306
            for ($i=1; $i<=$this->_totalPages; $i++) {
271
            for ($i=1; $i<=$this->_totalPages; $i++) {
307
                if ($i != $this->_currentPage) {
272
                if ($i != $this->_currentPage) {
308
                    $this->range[$i] = false;
273
                    $this->range[$i] = false;
309
                    $this->_linkData[$this->_urlVar] = $i;
274
                    $this->_linkData[$this->_urlVar] = $i;
310
                    $links .= $this->_renderLink($this->_altPage.' '.$i, $i);
275
                    $links .= $this->_renderLink($this->_altPage.' '.$i, $i);
311
                } else {
276
                } else {
312
                    $this->range[$i] = true;
277
                    $this->range[$i] = true;
313
                    $links .= $this->_curPageSpanPre . $i . $this->_curPageSpanPost;
278
                    $links .= $this->_curPageSpanPre . $i . $this->_curPageSpanPost;
314
                }
279
                }
315
                $links .= $this->_spacesBefore
280
                $links .= $this->_spacesBefore
316
                       . (($i != $this->_totalPages) ? $this->_separator.$this->_spacesAfter : '');
281
                       . (($i != $this->_totalPages) ? $this->_separator.$this->_spacesAfter : '');
317
            }
282
            }
318
        }
283
        }
319
        return $links;
284
        return $links;
320
    }
285
    }
321
 
286
 
322
    // }}}
287
    // }}}
323
}
288
}
324
?>
289
?>