[updated bridge files for] Problem with hidden albums [updated bridge files for] Problem with hidden albums
 

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]

Main Menu

[updated bridge files for] Problem with hidden albums

Started by karlson, June 11, 2004, 09:37:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

karlson

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.





jack

Please do not contact me for support directly - instead: post on this board!

Tarique Sani

Quote from: jack on June 12, 2004, 04:56:14 PM
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 :(
SANIsoft PHP applications for E Biz

Casper

I think Jack means version 1.3.1 of coppermine.  He has updated all the bridge files, in both stable and devel.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Tarique Sani

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
SANIsoft PHP applications for E Biz

Casper

The updated bridge files can be downloaded from HERE
These will remove the bug with hidden albums in the users gallery.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here