Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.1 #124

Open
wants to merge 2 commits into
base: 2.0
Choose a base branch
from
Open

2.1 #124

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
10 changes: 5 additions & 5 deletions PhpRbac/src/PhpRbac/core/lib/nestedset/full.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ function deleteConditional($ConditionString);


function childrenConditional($ConditionString);
function descendantsConditional($AbsoluteDepths=false,$ConditionString);
function descendantsConditional($ConditionString,$AbsoluteDepths=false);
function leavesConditional($ConditionString=null);
function pathConditional($ConditionString);

function depthConditional($ConditionString);
function parentNodeConditional($ConditionString);
function siblingConditional($SiblingDistance=1,$ConditionString);
function siblingConditional($ConditionString,$SiblingDistance=1);
/**/
}
/**
Expand Down Expand Up @@ -118,7 +118,7 @@ function depthConditional($ConditionString,$Rest=null)
* @param string $Rest optional, rest of variables to fill in placeholders of condition string, one variable for each ? in condition
* @return Array Node on success, null on failure
*/
function siblingConditional($SiblingDistance=1,$ConditionString,$Rest=null)
function siblingConditional($ConditionString,$Rest=null,$SiblingDistance=1)
{
$Arguments=func_get_args();
$ConditionString=$ConditionString; //prevent warning
Expand Down Expand Up @@ -224,7 +224,7 @@ function deleteSubtreeConditional($ConditionString,$Rest=null)
* @return Rowset including Depth field
* @seealso children
*/
function descendantsConditional($AbsoluteDepths=false,$ConditionString,$Rest=null)
function descendantsConditional($ConditionString,$Rest=null,$AbsoluteDepths=false)
{
if (!$AbsoluteDepths)
$DepthConcat="- (sub_tree.innerDepth )";
Expand Down Expand Up @@ -491,4 +491,4 @@ function editData($FieldValueArray=array(),$ConditionString=null,$Rest=null)

}

?>
?>
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 @@ -332,7 +332,7 @@ function children($ID)
*/
function descendants($ID)
{
$res = $this->{$this->type ()}->descendantsConditional(/* absolute depths*/false, "ID=?", $ID );
$res = $this->{$this->type ()}->descendantsConditional("ID=?", $ID, /* absolute depths*/false);
$out = array ();
if (is_array ( $res ))
foreach ( $res as $v )
Expand Down