coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Mystic Diamond on August 27, 2006, 06:44:00 PM

Title: BUG: catmgr.php - gallery with more than 245 categories
Post by: Mystic Diamond on August 27, 2006, 06:44:00 PM
There seems to be a bug with catmgr.php. I have tested this page all day long and realized that when there is more than 245 categories, then it crashes the page, with no appropriate error message.

245 categories is all right, but if you add 1 more, then the browser loads an error page. I have tested this with the Categories Manager and the backend database.

Is there any way that this bug can be fixed? Is there a limit to the number of categories that the software can support.

http://www.mysticpoints.net/gallery
Title: Re: BUG: catmgr.php - gallery with more than 245 categories
Post by: Stramm on August 27, 2006, 07:41:21 PM
read this thread... Nibbler posted a version of the catmgr that supports pagination
Title: Re: BUG: catmgr.php - gallery with more than 245 categories
Post by: Joachim Müller on August 27, 2006, 11:10:08 PM
Quote from: Stramm on August 27, 2006, 07:41:21 PM
read this thread.
Missing link.
Title: Re: BUG: catmgr.php - gallery with more than 245 categories
Post by: Nibbler on August 28, 2006, 12:18:15 AM
http://forum.coppermine-gallery.net/index.php?topic=33724.msg157763#msg157763
Title: Re: BUG: catmgr.php - gallery with more than 245 categories
Post by: Mystic Diamond on August 28, 2006, 07:51:34 AM
Thanks!
Title: Re: BUG: catmgr.php - gallery with more than 245 categories
Post by: Mystic Diamond on August 28, 2006, 07:59:50 AM
There is a bug in the catmgr.php code, but I fixed it (in case anyone else is using that code)

The page variable doesn't display the appropriate records because of the statement only multiplies the CATS_PER_PAGE if 0 occurs

OLD:
   $start = isset($_GET['page']) ? $_GET['page']-1 : 0 * CATS_PER_PAGE;

NEW:
   $start = isset($_GET['page']) ? $_GET['page']-1 : 0;
             $start *= CATS_PER_PAGE;