minor fix
This commit is contained in:
parent
99660726c4
commit
e0629e61bf
1 changed files with 3 additions and 2 deletions
|
@ -22,7 +22,7 @@ define('ALIBERR_MTREE', 10);
|
||||||
* );
|
* );
|
||||||
* </code></pre>
|
* </code></pre>
|
||||||
* @author $Author: tomas $
|
* @author $Author: tomas $
|
||||||
* @version $Revision: 1.4 $
|
* @version $Revision: 1.5 $
|
||||||
* @see ObjClasses
|
* @see ObjClasses
|
||||||
* Original author Tom Hlava
|
* Original author Tom Hlava
|
||||||
*/
|
*/
|
||||||
|
@ -276,7 +276,8 @@ class M2tree{
|
||||||
function getObjId($name, $parId=NULL)
|
function getObjId($name, $parId=NULL)
|
||||||
{
|
{
|
||||||
if($name=='' && is_null($parId)) $name = $this->rootNodeName;
|
if($name=='' && is_null($parId)) $name = $this->rootNodeName;
|
||||||
$parcond = (is_null($parId) ? "parid is null" : "parid='$parId'");
|
$parcond = (is_null($parId) ? "parid is null" :
|
||||||
|
"parid='$parId' AND level=1");
|
||||||
$r = $this->dbc->getOne("
|
$r = $this->dbc->getOne("
|
||||||
SELECT id FROM {$this->treeTable} t
|
SELECT id FROM {$this->treeTable} t
|
||||||
LEFT JOIN {$this->structTable} s ON id=objid
|
LEFT JOIN {$this->structTable} s ON id=objid
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue