Skip to content

Commit

Permalink
cot_structure_children() fix "001" == "001." but 001" !== "001."
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex300 committed Mar 24, 2023
1 parent 6ce01ab commit df79109
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions system/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1486,15 +1486,15 @@ function cot_structure_children($area, $cat, $allsublev = true, $firstcat = tru
$mtchlvl = mb_substr_count($mtch, ".");
}

$catsub = array();
if ($cat != '' && $firstcat && (($userrights && cot_auth($area, $cat, 'R') || !$userrights))) {
$catsub = [];
if ($firstcat && $cat != '' && (($userrights && cot_auth($area, $cat, 'R')) || !$userrights)) {
$catsub[] = $cat;
}

foreach (cot::$structure[$area] as $i => $x) {
if (
($cat == '' || mb_substr($x['path'], 0, $mtchlen) == $mtch) &&
(($userrights && cot_auth($area, $i, 'R') || !$userrights))
($cat == '' || (mb_substr($x['path'], 0, $mtchlen) === $mtch))
&& (($userrights && cot_auth($area, $i, 'R')) || !$userrights)
) {
//$subcat = mb_substr($x['path'], $mtchlen + 1);
if ($allsublev || (!$allsublev && mb_substr_count($x['path'],".") == $mtchlvl)) {
Expand Down

0 comments on commit df79109

Please sign in to comment.