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]   Go Down

Author Topic: Useless (?) count query in all views  (Read 3642 times)

0 Members and 1 Guest are viewing this topic.

ulikoeln

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Useless (?) count query in all views
« on: August 31, 2005, 09:37:08 pm »

While browsing the 1.4 gallery anonymously with debugging on, I found that every view
(album, thumbnail, image display ... etc) triggers a count of non-approved images.
This is probably unnecessary ...

From Debug:
[2] => SELECT /*   functions.inc 1415 */ COUNT(*) FROM cpg14b_pictures WHERE approved = 'NO'


BTW attached is a modified functions.inc that has Line numbers in the SQL statements for debugging purposes;
unfortunately not all SELECTs are capitalized in the source, so this can not be added automatically in all scripts ...

 ( functions.inc is  based on
$Revision: 1.186 $
  $Author: nibbler999 $
  $Date: 2005/05/07 10:57:46 $
)

« Last Edit: September 06, 2005, 01:38:15 pm by GauGau »
Logged

Nibbler

  • Guest
Re: Useless (?) count query in all views
« Reply #1 on: August 31, 2005, 10:03:55 pm »

I committed this tweak into themes.inc.php v1.5. Apparently it was subsequently lost by a careless commit of v1.7.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 18 queries.