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]

With a couple of simple changes, I've set the date to the max of last uploaded to album, or max last uploaded date of a linked image.All changes in index.php - based on 1.5.26 code base - $CONFIG['link_pic_count'] must be set for this to have any effect

For display in a category list (index.php?cat=x)In function list_albums:replace

The above alone results in (same album as example above):"6 files, last one added on Jan 29, 2013, 138 linked files, 144 files total" - a little misleading in that last add was linked file...

A couple more changes to reformat the message - in same two functions...In function list_albums:replace TWICE (once in 'if' - again in immediately following 'else' - the two occurrences have a one space (insignificant) difference between current strings)

And again - similar changes - different function...In function list_cat_albums:replace TWICE (once in 'if' - again in immediately following 'else' - the two occurrences have a one space (insignificant) difference between current strings)

If acceptable, I would like to suggest these changes be incorporated into the base?I think it gives a more accurate view of updates to an album the user will see upon viewing.

(Ideally I'd like to see random and last loaded on the category page include linked files as well if $CONFIG['link_pic_count'] is set - but I haven't gotten that far in the code... Perhaps another thread.. looks like updates to function get_pic_data for meta albums 'lastup' and 'random' at least and maybe others if they consider album and/or cat... Any interest from others?.. )

My thought (and the way I coded) was based on the existing config option: $CONFIG['link_pic_count'] - "Show number of linked files" under "Album List View"

If showing the linked files was requested - then use the last date as 'max' of uploaded and linked data... as that will reflect the actual contents the user will see if they choose to view the album.If the setting is not selected (or if the album in question does not have linked files), the code change has no effect...

I didn't change any language files to implement - just gathered the additional data and reordered the existing message segments (already separate entries in the language files.)

We should avoid to change the default layout if not necessary (e.g. for security reasons). You can be sure that it'll cause at least one support thread, that it now looks different and how to undo that change. That's why I want to add it as (hidden) opt-in feature, like I've done it already for several things in cpg1.5.x.

Understand.. recoded for a new (hidden for now) config option 'link_last_upload' to indicate use the upload date of the last linked file if greater than last upload...If this new option is set - and link_pic_count is also set, then last upload date will be set to max of last upload and last linked pic upload - and message reformatted.If this new option is off - or if no linked pictures in the album, this code has no effect.

Even if link_pic_count is NOT set today - it still takes effect if there are ONLY linked pictures in an album (not a change made here...)This new option will be honored (on or off) in this case as well.

Consolidated to one set of updates for each function.

For display in a category list (index.php?cat=x)In function list_albums:replace

Seems I had a small 'source control' issue between my local source code I created the post with and my testbed code when testing the last set of changes... as I had found/corrected the $value/$link_stats and the ==/> issues.I concur with your changes... $value was assigned 'by value' in the foreach - so doesn't contain the new 'link_pic_count' key... and the test should be > 0...Sorry for that one...

I had not tested the 3rd case of only linked pictures - I saw the code would be invoked regardless of the setting of $CONFIG['link_pic_count'] - and made sure I honored the request of the new field - but my test cases didn't include that scenario. Thank you for finding/correcting that issue. I've added that test case to my test gallery now...