X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=distmaker%2Futils%2Fjoomlaxml.php;h=087555ec64ffdadc6b423b9911bbce89648659ec;hb=d830d3ae5b3b6c936835fcb9c5dfdb1b62cb5612;hp=69838daa40047b10840be5f56c0708664ef50019;hpb=fd57ced7b04d32d5fab5e68c1b12aedbf35c2ad8;p=civicrm-core.git diff --git a/distmaker/utils/joomlaxml.php b/distmaker/utils/joomlaxml.php index 69838daa40..087555ec64 100644 --- a/distmaker/utils/joomlaxml.php +++ b/distmaker/utils/joomlaxml.php @@ -1,5 +1,5 @@ getPermissions(); + $perm = $comp->getPermissions(FALSE, TRUE); if ($perm) { $info = $comp->getInfo(); - foreach ($perm as $p) { - $permissions[$p] = $info['translatedName'] . ': ' . $p; + foreach ($perm as $p => $attr) { + $title = $info['translatedName'] . ': ' . array_shift($attr); + array_unshift($attr, $title); + $permissions[$p] = $attr; } } } $perms_array = array(); - foreach ($permissions as $perm => $title) { + foreach ($permissions as $perm => $attr) { + // give an empty string as default description + $attr[] = ''; + //order matters here, but we deal with that later - $perms_array[CRM_Utils_String::munge(strtolower($perm))] = $title; + $perms_array[CRM_Utils_String::munge(strtolower($perm))] = array( + 'title' => array_shift($attr), + 'description' => array_shift($attr), + ); } $smarty->assign('permissions', $perms_array);