Skip to content

Commit

Permalink
PHP 7.3 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gruberroland committed Feb 1, 2019
1 parent 1bd598b commit 716d119
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions lam/templates/3rdParty/pla/lib/AJAXTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,25 +57,30 @@ protected function draw_item($item,$level,$first_child=true,$last_child=true) {
$child_count = $this->readChildrenNumber($entry->getDN());

$nb = 0;
if ($first_child)
if ($first_child) {
$nb += 1;
if ($last_child)
}
if ($last_child) {
$nb += 2;
}
if ($level < 1) {
$nb += 1;
}

$imgs['expand'] = array('tree_expand.png','tree_expand.png','tree_expand_corner.png',
($level > 0) ? 'tree_expand_corner.png' : 'tree_expand_corner_first.png');
'tree_expand_corner.png', 'tree_expand_corner_first.png');

$imgs['collapse'] = array('tree_collapse.png','tree_collapse.png','tree_collapse_corner.png',
($level > 0) ? 'tree_collapse_corner.png' : 'tree_collapse_corner_first.png');
'tree_collapse_corner.png', 'tree_collapse_corner_first.png');

$imgs['tree'] = array('tree_split.png','tree_split.png','tree_corner.png','tree_corner.png');
$imgs['tree'] = array('tree_split.png','tree_split.png','tree_corner.png','tree_corner.png','tree_corner.png');

/** Information on array[$nb]
* nb == 1 => the node is the first child
* nb == 2 => the node is the last child
* nb == 3 => the node is the unique child
* nb == 0 => the node is a child */
$new_code = array('1','1','0','0');
$new_code = array('1','1','0','0','0');

# Links
$parms['openclose'] = htmlspecialchars(sprintf('server_id=%s&dn=%s&code=%s%s',$this->getServerID(),$entry->getDNEncode(),$code,$new_code[$nb]));
Expand Down

0 comments on commit 716d119

Please sign in to comment.