projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #19174 from eileenmcnaughton/conttype
[civicrm-core.git]
/
distmaker
/
utils
/
joomlaxml.php
diff --git
a/distmaker/utils/joomlaxml.php
b/distmaker/utils/joomlaxml.php
index 69838daa40047b10840be5f56c0708664ef50019..087555ec64ffdadc6b423b9911bbce89648659ec 100644
(file)
--- a/
distmaker/utils/joomlaxml.php
+++ b/
distmaker/utils/joomlaxml.php
@@
-1,5
+1,5
@@
<?php
<?php
-define('CIVICRM_MYSQL_STRICT', 0);
+
if (isset($GLOBALS['_SERVER']['DM_SOURCEDIR'])) {
$sourceCheckoutDir = $GLOBALS['_SERVER']['DM_SOURCEDIR'];
}
if (isset($GLOBALS['_SERVER']['DM_SOURCEDIR'])) {
$sourceCheckoutDir = $GLOBALS['_SERVER']['DM_SOURCEDIR'];
}
@@
-80,26
+80,35
@@
function generateJoomlaConfig($version) {
require_once 'CRM/Core/Permission.php';
require_once 'CRM/Utils/String.php';
require_once 'CRM/Core/Permission.php';
require_once 'CRM/Utils/String.php';
- $permissions = CRM_Core_Permission::getCorePermissions();
+ require_once 'CRM/Core/I18n.php';
+ $permissions = CRM_Core_Permission::getCorePermissions(TRUE);
$crmFolderDir = $sourceCheckoutDir . DIRECTORY_SEPARATOR . 'CRM';
require_once 'CRM/Core/Component.php';
$components = CRM_Core_Component::getComponentsFromFile($crmFolderDir);
foreach ($components as $comp) {
$crmFolderDir = $sourceCheckoutDir . DIRECTORY_SEPARATOR . 'CRM';
require_once 'CRM/Core/Component.php';
$components = CRM_Core_Component::getComponentsFromFile($crmFolderDir);
foreach ($components as $comp) {
- $perm = $comp->getPermissions();
+ $perm = $comp->getPermissions(
FALSE, TRUE
);
if ($perm) {
$info = $comp->getInfo();
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();
}
}
}
$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
//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);
}
$smarty->assign('permissions', $perms_array);