Re: DB_NestedSet _verifyUserValues issue ?

From: Date: Thu, 06 Nov 2003 09:06:00 +0000
Subject: Re: DB_NestedSet _verifyUserValues issue ?
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-23271@lists.php.net to get a copy of this message
Hello Arnaud, Arnaud Limbourg wrote:
Tracking a bug i found the code in
    function _verifyUserValues($caller, &$values)
    {
to be be confusing. The following loop occurs to run a check
        foreach($values AS $field=>$value) {
            if(!isset($this->params[$field])) {
                $epr = array(
The problem is that the $this->params array is of the form 'RealFieldName' => 'id' If i understood correctly the $this->_flparams should be used, otherwise the check always fails. Am i correct ?
No - hopefully not :) 'STRID' => 'id' Means that the field for the name is 'STRID' in userspace and database. So you pass something like $values['STRID'] = 'mynode'. The class simply has to know which column/param contains e.g. the id. So the isset looks like that: if(!isset($this->params['STRID'])) This whole thing was tested and should really work as intended. BTW: Jason Rust was so nice to change the createRootNode() method (in CVS). Now it is possible to do a createRootNode() without knowing any other rootnodes id. This was requested a few times. greetings -- Daniel Khan

« previous php.pear.dev (#23271) next »