News:

cpg1.5.46 Security release - upgrade mandatory!The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.[more]

"The parent category of this album. A category of 0 indicates the album is in 'no category' and is displayed on the main page directly. If the value is more than 10000 then it means the album is a user album belonging to the user with id of category - 10000."

Is there any chance for me to increase these limit to 100.000? My users can't make more categories because the gallery started to add them to user galleries.

define('FIRST_USER_CAT', 10000);This can be changed... but may be some 'downstream effects'... If you don't have any user galleries - I suspect you may be ok.

If you do - at least the albums table may reference categories over 10,000... They would need to be adjusted based on the new value you set. (ie - if changing from 10000 to 50000, the category reference in cpg_albums would need to be changed from 10xxx to 50xxx.Something like this issued thru a tool like phpMyAdmin:

define('FIRST_USER_CAT', 50000);catmgr.php(Other Dev's - not sure this needs to or should change... sets default pos in cpg_categories to 10000 - but tree rebuild is based on lft=0... Don't see what it would hurt changing... Please comment...)find:

Something told me i should have tested that one... An expression setting a default value... thought that might be an issue. ok...Just drop the '+ 1' - there is already code to change a value of FIRST_USER_CAT to FIRST_USER_CAT + 1...

Can you please explain this more detailed or tell me where I find the corresponding code? Thanks.

In catmgr - the 'default' pos on insert seems to be getting set to 10000... I assume that is just to get it out of the way - and should be able to change to 'FIRST_USER_CAT'...

Following the insert (catmgr.php) - check_rebuild_tree (functions.inc.php) is called - and it looks for any categories with lft=0 (lft is not included in the INSERT command and database default value is 0) and determines/sets the correct lft, rgt, depth, pos for the new categories - resetting the 10000 used at INSERT time a few milliseconds ago.

I think changing to FIRST_USER_CAT is appropriate for the INSERT - as it should keep from having a conflicting 'pos' in the small window between INSERT and tree rebuild. Certainly doesn't hurt anything I can see.

(This was an interesting area to explore when I wrote the gallery_merge plugin... as I was adding the 'merged' categories and still maintaining the tree structure. Turned out to be simple - set lft=0 and let check_rebuild_tree do the heavy lifting.)