Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-14503

Incorrect global groups listing

    Details

      Description

      In the function getGroupsHierarchy() the fetched query is parsed correctly, but then the $root array is created. With fetched roots. But when security restrictions applied, for example, a user (group admin) is allowed to operate only with one group, or a set of groups without parents (roots) provided (in different hierarchical levels; or when security limitations applied), no parent information provided (but all fetched groups are with parents, for example), the returned (by the function) groupsReturn array is empty.
      So, we need to parse groups left in $rows after the next loop:
      while (count($roots))

      { ....... }

      Proposal: insert the small part of code here
      foreach($rows as $value)
      $groups[$value['id']] = array($value['prefix'], $value['title']);

      // Prefix titles with the calcuated spacing to give the visual
      // appearance of ordering when transformed into HTML in the form layer. Add description and visibility.
      $groupsReturn = array();

      Thanx!

        Attachments

          Activity

            People

            • Assignee:
              kurund Kurund Jalmi
              Reporter:
              slack Vadim S.
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: