Member
Member
Grimeton   2011-07-30, 18:58
#1

Hi,

I just installed the latest version from trunk and got this in my queries again:

`

              307 Query     SELECT * FROM ``zp_albums` WHERE `parentid` IS NULL
              307 Query     SELECT * FROM `zp_albums`

I haven't debugged it yet maybe you know where the select comes from.

Thanks!

KR,

Grimeton

Member
Member
Grimeton   2011-07-30, 19:52
#2

Hi,

found it. It's method cache() from PersistenObject...

KR,

Grimeton

Member
Member
sbillard   2011-07-30, 20:06
#3

You do not say what you are running, but if it is not the development build then this is expected.

Member
Member
Grimeton   2011-07-30, 20:28
#4

Hi,

latest version from trunk, as I said before:

`

$ svn info trunk/

Path: trunk

URL: http://www.zenphoto.org/svn/trunk

Repository Root: http://www.zenphoto.org/svn

Repository UUID: 46129fc4-274e-7f48-8cfa-5da4c607681c

Revision: 7829

Node Kind: directory

Schedule: normal

Last Changed Author: acrylian

Last Changed Rev: 7829

Last Changed Date: 2011-07-30 13:04:17 +0200 (Sa, 30 Jul 2011)

`

The "problem" comes from the method cache() of PersistentObject.

When the system tries to array_diff_assoc the two arrays for the Gallery, the array $cache_set is of size 0 (line 99 in classes.php), so the getWhereClause() function returns just nothing and "SELECT * from zp_albums;" is send to the database (line 118).

I just changed line 117 from "} else {" to } elsif (sizeof($cache_set) > 0) {" to avoid queries without a where clause.

cu

Member
Member
sbillard   2011-07-30, 20:47
#5

As said, use the dev branch

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.