Advanced search  

News:

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

Pages: 1 [2]   Go Down

Author Topic: (1.4.1) Virtual album - image count 0 when displayable images  (Read 16047 times)

0 Members and 1 Guest are viewing this topic.

Nibbler

  • Guest
Re: (1.4.1) Virtual album - image count 0 when displayable images
« Reply #20 on: September 04, 2005, 02:27:28 am »

Code: [Select]
    $sql = "SELECT a.aid, count( p.pid )  AS pic_count, max( p.pid )  AS last_pid, max( p.ctime )  AS last_upload, a.keyword" .
            " FROM {$CONFIG['TABLE_ALBUMS']} AS a " .
            " LEFT JOIN {$CONFIG['TABLE_PICTURES']} AS p ON a.aid = p.aid AND p.approved =  'YES' ".
            "WHERE a.aid IN $album_set" . "GROUP BY p.aid";

Change that GROUP BY to a.aid instead of p.aid in both places that use the code.

Logged

P4ul

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: (1.4.1) Virtual album - image count 0 when displayable images
« Reply #21 on: September 04, 2005, 02:49:25 am »

You're the man  :)

Fixed it for me, i can move my virtual album anywhere in the tree and the linked count is correct , many thanks

that was index.php for anyone who needs the fix
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: (1.4.1) Virtual album - image count 0 when displayable images
« Reply #22 on: September 04, 2005, 02:57:21 am »

Confirmed fixed. Thanks, Nibbler! :)
Logged

Nibbler

  • Guest
Re: (1.4.1) Virtual album - image count 0 when displayable images
« Reply #23 on: September 04, 2005, 03:08:28 am »

Thanks. Comitted to index.php 1.86
Logged
Pages: 1 [2]   Go Up
 

Page created in 0.018 seconds with 20 queries.