From: Brian Shaughnessy Date: Tue, 23 Apr 2013 23:18:08 +0000 (-0400) Subject: CRM-12096 support joomla 3.0 ACL config X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f2f96436a1f06f52690d3c61d1410c6b0a0efc00;p=civicrm-core.git CRM-12096 support joomla 3.0 ACL config --- diff --git a/CRM/Admin/Page/Access.php b/CRM/Admin/Page/Access.php index 3a02f55dd0..bf595e4fcb 100644 --- a/CRM/Admin/Page/Access.php +++ b/CRM/Admin/Page/Access.php @@ -51,11 +51,23 @@ class CRM_Admin_Page_Access extends CRM_Core_Page { break; case 'Joomla': - JHTML::_('behavior.modal'); - $url = $config->userFrameworkBaseURL . "index.php?option=com_config&view=component&component=com_civicrm&tmpl=component"; - $jparams = 'rel="{handler: \'iframe\', size: {x: 875, y: 550}, onClose: function() {}}" class="modal"'; - $this->assign('ufAccessURL', $url); - $this->assign('jAccessParams', $jparams); + //condition based on Joomla version; <= 2.5 uses modal window; >= 3.0 uses full page with return value + if( version_compare(JVERSION, '3.0', 'lt') ) { + JHTML::_('behavior.modal'); + $url = $config->userFrameworkBaseURL . 'index.php?option=com_config&view=component&component=com_civicrm&tmpl=component'; + $jparams = 'rel="{handler: \'iframe\', size: {x: 875, y: 550}, onClose: function() {}}" class="modal"'; + + $this->assign('ufAccessURL', $url); + $this->assign('jAccessParams', $jparams); + } + else { + $uri = (string) JUri::getInstance(); + $return = urlencode(base64_encode($uri)); + $url = $config->userFrameworkBaseURL . 'index.php?option=com_config&view=component&component=com_civicrm&return=' . $return; + + $this->assign('ufAccessURL', $url); + $this->assign('jAccessParams', ''); + } break; case 'WordPress':