[dev] [Fwd: [cvs] commit: framework/DataTree DataTree.php framework/DataTree/DataTree null.php sql.php]

Karsten Fourmont fourmont at gmx.de
Sun Feb 4 05:04:41 PST 2007


Hi,

 >chuck       2007-01-26 00:50:35 EST
 >
 > Modified files:
 >    DataTree             DataTree.php
 >    DataTree/DataTree    null.php sql.php
 >  Log:
 >  Try to eliminate a lot of costly loading when we just need an
 >  object's name or id.
 >  Inspired by: Karsten Fourmont <fourmont at gmx.de>

it seems this change creates new subtle issues:

when you do
$r = $dt->add(new DataTreeObject('fake:b'));

twice, but not within the same session (script), then you'll end up with
the object "fake:b" twice in the datatree! Surely not what's intended.
Run the script below two times and then browser syncml.fake with the 
datatree browser to see what I mean.

Cheers,
  Karsten


#!/usr/bin/php
<?php

/* init script */
$session_control = 'none';
@define('AUTH_HANDLER', true);
@define('HORDE_BASE', dirname(__FILE__) . '/../../..');
require_once HORDE_BASE . '/lib/core.php';
require_once 'Horde/CLI.php';
$cli = &Horde_CLI::singleton();
$cli->init();
require_once HORDE_BASE . '/lib/base.php';


/* init datatree */
$driver = $GLOBALS['conf']['datatree']['driver'];
$params = Horde::getDriverConfig('datatree', $driver);
$params = array_merge($params, array('group' => 'syncml'));

$dt =& DataTree::singleton($driver, $params);

/* create object */
$r = $dt->add(new DataTreeObject('fake:b'));


-------- Original Message --------
Subject: [cvs] commit: framework/DataTree DataTree.php 
framework/DataTree/DataTree null.php sql.php
Date: Fri, 26 Jan 2007 00:50:35 -0500 (EST)
From: Chuck Hagenbuch <chuck at horde.org>
Reply-To: dev at lists.horde.org
To: cvs at lists.horde.org

chuck       2007-01-26 00:50:35 EST

   Modified files:
     DataTree             DataTree.php
     DataTree/DataTree    null.php sql.php
   Log:
   Try to eliminate a lot of costly loading when we just need an object's
   name or id.
   Inspired by: Karsten Fourmont <fourmont at gmx.de>

   Revision  Changes    Path
   1.181     +18 -21    framework/DataTree/DataTree.php
   1.33      +39 -1     framework/DataTree/DataTree/null.php
   1.225     +75 -8     framework/DataTree/DataTree/sql.php

   Chora Links:
 
http://cvs.horde.org/diff.php/framework/DataTree/DataTree.php?r1=1.180&r2=1.181&ty=u
 
http://cvs.horde.org/diff.php/framework/DataTree/DataTree/null.php?r1=1.32&r2=1.33&ty=u
 
http://cvs.horde.org/diff.php/framework/DataTree/DataTree/sql.php?r1=1.224&r2=1.225&ty=u

-- 
To unsubscribe, mail: cvs-unsubscribe at lists.horde.org



More information about the dev mailing list