Projects ⇒ Bugs ⇒ #568: "Last Updated Album" doesn't update ⇒ CPG Dragonfly™ CMS
Bug #568 "Last Updated Album" doesn't update
Project: Dragonfly 9.0.3 -> 9.3 Category: Coppermine
Submitted: Friday, June 24, 2005 (00:00:34) Modified: Thursday, August 17, 2006 (23:04:57)
Status: Closed Assigned to:
PHP Version: 4.3.10 HTTPD Server: Apache 2.0
Votes: 3
Vote results:
Avg. Score: 4.7 ± 0.5 Reproduced: 3 of 3 (100.0%)
Same PHP Version: 2 (66.7%) Same HTTPD Server: 2 (66.7%)

View/Vote Add Comment

by: insaner
When a user uploads a photo to an album that already has had pictures uploaded to it in the past, it won't update on the main coppermine page to reflect that the album has since been updated.

Reproduce code:
Create an album (TestAlbum1). Upload a picture to TestAlbum1. Then, create another album (TestAlbum2). Upload a picture to TestAlbum2. Then, go back to the TestAlbum1, upload a picture a few days later and you'll see that the "Last Updated Album" does not update TestAlbum1 on the main page.

Expected result:
Anytime a picture is uploaded to any album, the "Last Updated Album" should reflect that.

Actual result:
The only time it'll reflect on the "Last Updated Album" bar is when there hasn't been any pictures uploaded to that particular album previously. If the album is empty, and you upload a picture, it'll show as being on the "Last Updated Album" bar.
by: sarah
I can reproduce this, but I can't find where to fix it, can someone better with Coppermine look?
by: christophe
As the module is coded, the name should be last "created" album.
That's because the query for lastalb in includes/coppermine/ is :

$result = $db->sql_query("SELECT *, a.title AS title, a.aid AS aid FROM {$CONFIG['TABLE_PICTURES']}AS p INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON (p.aid = a.aid AND ".VIS_GROUPS." AND $thisalbum) WHERE approved = 'YES' GROUP BY p.aid ORDER BY p.ctime DESC $limit",false,__FILE__,__LINE__);

It doesn't take account of max(p.ctime) ...

The following query shows the updated albums in order but doesn't show max(p.ctime) because of the select *.
#$result = $db->sql_query("SELECT *, a.title AS title, a.aid AS aid, max(p.ctime) AS mt FROM {$CONFIG['TABLE_PICTURES']} AS p INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON (p.aid = a.aid AND ".VIS_GROUPS." AND $thisalbum) WHERE approved = 'YES' GROUP BY p.aid ORDER BY mt DESC $limit",false,__FILE__,__LINE__);
by: insaner
I see... but instead of changing the module to "Last Created Album" it be more relavent to make sure that it indeed displays "Last Updated Album"

Thank you Christophe for troubleshooting this, hopefully the devs will fix it :)
by: Phoenix
This bug has been fixed in the CVS.

Snapshots of the sources are packaged every 6 hours; this change
will be in the next snapshot. You can grab the snapshot at the
Downloads section.

Thank you for the report, and for helping us to make Dragonfly 9.0.3 -> 9.1 better.
User Info

Welcome Anonymous


Support for DragonflyCMS in a other languages: