diff --git a/.gitignore b/.gitignore index 477de25..4fd0fec 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,12 @@ .settings .buildpath .project +.idea *bak* *draft* *phprbac.sqlite3* *Doxygen* *phpdoc* -index.php \ No newline at end of file +index.php +vendor +/composer.lock \ No newline at end of file diff --git a/PhpRbac/src/PhpRbac/core/lib/nestedset/full.php b/PhpRbac/src/PhpRbac/core/lib/nestedset/full.php index f2db5a8..8383e5a 100644 --- a/PhpRbac/src/PhpRbac/core/lib/nestedset/full.php +++ b/PhpRbac/src/PhpRbac/core/lib/nestedset/full.php @@ -221,11 +221,12 @@ function deleteSubtreeConditional($ConditionString,$Rest=null) * @param boolean $AbsoluteDepths to return Depth of sub-tree from zero or absolutely from the whole tree * @param string $Condition * @param string $Rest optional, rest of variables to fill in placeholders of condition string, one variable for each ? in condition - * @return Rowset including Depth field - * @seealso children + * @return Rowset including Depth field + * @seealso children */ - function descendantsConditional($ConditionString,$Rest=null,$AbsoluteDepths=false) + function descendantsConditional($ConditionString,$AbsoluteDepths=false,$Rest=null) { + $DepthConcat = ""; if (!$AbsoluteDepths) $DepthConcat="- (sub_tree.innerDepth )"; $Arguments=func_get_args(); diff --git a/PhpRbac/src/PhpRbac/core/lib/rbac.php b/PhpRbac/src/PhpRbac/core/lib/rbac.php index e23ac01..cd105a7 100644 --- a/PhpRbac/src/PhpRbac/core/lib/rbac.php +++ b/PhpRbac/src/PhpRbac/core/lib/rbac.php @@ -334,7 +334,7 @@ function children($ID) */ function descendants($ID) { - $res = $this->{$this->type ()}->descendantsConditional("ID=?", $ID, /* absolute depths*/false); + $res = $this->{$this->type()}->descendantsConditional("ID=?", false, $ID); $out = array (); if (is_array ( $res )) foreach ( $res as $v )