Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
.settings
.buildpath
.project
.idea
*bak*
*draft*
*phprbac.sqlite3*
*Doxygen*
*phpdoc*
index.php
index.php
vendor
/composer.lock
7 changes: 4 additions & 3 deletions PhpRbac/src/PhpRbac/core/lib/nestedset/full.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion PhpRbac/src/PhpRbac/core/lib/rbac.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down