Address Book Pagination [SVN 13876]
Craig Shelley <[email protected]>
| Newsgroups | gmane.mail.squirrelmail.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I am having a problem with the address book showing "Address book is
empty".
After narrowing this down, I eventually found that the variable
$page_number was 0. The pagination routine in src/addressbook.php
assumes that the page numbers start at 1, hence missing the first page
of addresses.
I fixed the problem as shown below, but don't know if this was the
correct way to fix it.
Regards,
Craig
Index: src/addressbook.php
===================================================================
--- src/addressbook.php (revision 13876)
+++ src/addressbook.php (working copy)
@@ -389,7 +389,7 @@
$new_address_list = array();
$total_pages = ceil($total_addresses / $page_size);
if ($page_number > $total_pages) $page_number = $total_pages;
- $page_count = 1;
+ $page_count = 0;
$page_item_count = 0;
foreach ($addresses[$current_backend]['Addresses'] as $addr) {
$page_item_count++;
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
-----
squirrelmail-devel mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [email protected]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel
signature.asc
(application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAksRnQoACgkQ5OI9vmOoVqFR0QCfSfGjxqbG0SDhr+5LksZmxySY RWYAoPx0N+8dAr2fPKXDfUFyo12yzYmj =q/9q -----END PGP SIGNATURE-----