Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?php |
2 | /* | |
3 | +--------------------------------------------------------------------+ | |
bc77d7c0 | 4 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 5 | | | |
bc77d7c0 TO |
6 | | This work is published under the GNU AGPLv3 license with some | |
7 | | permitted exceptions and without any warranty. For full license | | |
8 | | and copyright information, see https://civicrm.org/licensing | | |
6a488035 | 9 | +--------------------------------------------------------------------+ |
d25dd0ee | 10 | */ |
6a488035 TO |
11 | |
12 | /** | |
13 | * | |
14 | * @package CRM | |
ca5cec67 | 15 | * @copyright CiviCRM LLC https://civicrm.org/licensing |
6a488035 TO |
16 | */ |
17 | ||
18 | /** | |
ce064e4f | 19 | * Dashboard page for managing Access Control. |
20 | * | |
6a488035 TO |
21 | * For initial version, this page only contains static links - so this class is empty for now. |
22 | */ | |
23 | class CRM_Admin_Page_Access extends CRM_Core_Page { | |
62d3ee27 | 24 | |
e0ef6999 EM |
25 | /** |
26 | * @return string | |
27 | */ | |
00be9182 | 28 | public function run() { |
6a488035 TO |
29 | $config = CRM_Core_Config::singleton(); |
30 | ||
31 | switch ($config->userFramework) { | |
32 | case 'Drupal': | |
d8a826dc | 33 | $this->assign('ufAccessURL', url('admin/people/permissions')); |
6a488035 TO |
34 | break; |
35 | ||
36 | case 'Drupal6': | |
d8a826dc | 37 | $this->assign('ufAccessURL', url('admin/user/permissions')); |
6a488035 TO |
38 | break; |
39 | ||
40 | case 'Joomla': | |
f2f96436 | 41 | //condition based on Joomla version; <= 2.5 uses modal window; >= 3.0 uses full page with return value |
481a74f4 | 42 | if (version_compare(JVERSION, '3.0', 'lt')) { |
f2f96436 BS |
43 | JHTML::_('behavior.modal'); |
44 | $url = $config->userFrameworkBaseURL . 'index.php?option=com_config&view=component&component=com_civicrm&tmpl=component'; | |
45 | $jparams = 'rel="{handler: \'iframe\', size: {x: 875, y: 550}, onClose: function() {}}" class="modal"'; | |
46 | ||
47 | $this->assign('ufAccessURL', $url); | |
48 | $this->assign('jAccessParams', $jparams); | |
49 | } | |
50 | else { | |
51 | $uri = (string) JUri::getInstance(); | |
52 | $return = urlencode(base64_encode($uri)); | |
53 | $url = $config->userFrameworkBaseURL . 'index.php?option=com_config&view=component&component=com_civicrm&return=' . $return; | |
54 | ||
55 | $this->assign('ufAccessURL', $url); | |
56 | $this->assign('jAccessParams', ''); | |
57 | } | |
6a488035 TO |
58 | break; |
59 | ||
60 | case 'WordPress': | |
61 | $this->assign('ufAccessURL', CRM_Utils_System::url('civicrm/admin/access/wp-permissions', 'reset=1')); | |
62 | break; | |
63 | } | |
64 | return parent::run(); | |
65 | } | |
96025800 | 66 | |
6a488035 | 67 | } |