[dev] Datatree changes break giapeto
Roel Gloudemans
roel at gloudemans.info
Mon Mar 5 17:55:02 UTC 2007
I think I found an inconsistency in the DataTree code.
In DataTree.php:
function getId($name)
{
....
/* Flip the name map to look up the id using the name as key. */
if (($id = array_search($name, $this->_nameMap)) !== false) {
return $id;
}
/* Not found in name map, consult the backend. */
$id = $this->_getId($name);
....
}
The namemap contains the full namepath (with : as separator). If the
name is not in the namemap, getId is called with the full namepath
in DataTree/sql.php
function _getId($name)
{
$query = 'SELECT datatree_id FROM ' . $this->_params['table'] . '
WHERE group_uid = ? AND datatree_name = ?';
$values = array($this->_params['group'], $name);
....
}
So the query is done using the full namepath, but that is not the way
it is stored in the database.
Cheers,
Roel.
Quoting Chuck Hagenbuch <chuck at horde.org>:
> Quoting Roel Gloudemans <roel at gloudemans.info>:
>
>> The update from 1.180 to 1.181 breaks giapeto.
>
> Update again please.
>
> -chuck
>
> --
> "we are plastered to the windshield of the bus that is time." - Chris
>
> --
> Horde developers mailing list - Join the hunt: http://horde.org/bounties/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org
More information about the dev
mailing list