forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 (BBS) Integration / Bridging => Topic started by: karlson on June 11, 2004, 09:37:01 pm

Title: [updated bridge files for] Problem with hidden albums
Post by: karlson on June 11, 2004, 09:37:01 pm
Then users have hidden albums
page will not render properly giving Warning: Cannot add header information - headers already sent  

This is caused by malformed SQL query

I found a bug in function udb_list_users_query in bridge/phpbb.inc.php

global variable $FORBIDDEN_SET is reset here to serve the query below. However it causes problems in other palces

I have replace the following lines

if ($FORBIDDEN_SET != "") $FORBIDDEN_SET = "AND $FORBIDDEN_SET";


    $sql = "SELECT (category - " . FIRST_USER_CAT . ") as user_id," . "        '???' as user_name," . "        COUNT(DIST
INCT a.aid) as alb_count," . "        COUNT(DISTINCT pid) as pic_count," . "        MAX(pid) as thumb_pid " . "FROM {$CON
FIG['TABLE_ALBUMS']} AS a " . "INNER JOIN {$CONFIG['TABLE_PICTURES']} AS p ON p.aid = a.aid " . "WHERE approved = 'YES' A
ND category > " . FIRST_USER_CAT . " $FORBIDDEN_SET " . "GROUP BY category " . "ORDER BY category ";

THIS this one

if ($FORBIDDEN_SET != "") $FORBIDDEN_SET1 = "AND $FORBIDDEN_SET";


    $sql = "SELECT (category - " . FIRST_USER_CAT . ") as user_id," . "        '???' as user_name," . "        COUNT(DIST
INCT a.aid) as alb_count," . "        COUNT(DISTINCT pid) as pic_count," . "        MAX(pid) as thumb_pid " . "FROM {$CON
FIG['TABLE_ALBUMS']} AS a " . "INNER JOIN {$CONFIG['TABLE_PICTURES']} AS p ON p.aid = a.aid " . "WHERE approved = 'YES' A
ND category > " . FIRST_USER_CAT . " $FORBIDDEN_SET1 " . "GROUP BY category " . "ORDER BY category ";


I have checked all othe files for integration with BBS and they all have same problem.




Title: Re: Problem with hidden albums
Post by: jack on June 12, 2004, 04:56:14 pm
Fixed in 1.3.1
Title: Re: Problem with hidden albums
Post by: Tarique Sani on June 13, 2004, 05:03:29 am
Fixed in 1.3.1
You mean version 1.3.1 of which file? did you commit to devel and stable both? I still can't access the CVS :(
Title: Re: Problem with hidden albums
Post by: Casper on June 13, 2004, 09:47:18 am
I think Jack means version 1.3.1 of coppermine.  He has updated all the bridge files, in both stable and devel.
Title: Re: Problem with hidden albums
Post by: Tarique Sani on June 13, 2004, 11:09:07 am
In that case we have to post a solution for this on one of the boards till the time we don't release 1.3.1
Title: Re: Problem with hidden albums
Post by: Casper on June 13, 2004, 12:55:06 pm
The updated bridge files can be downloaded from HERE (http://cvs.sourceforge.net/viewcvs.py/coppermine/stable/bridge/)
These will remove the bug with hidden albums in the users gallery.