| 16 |
|
|
| 17 |
$element = mosGetParam( $_REQUEST, 'element', '' ); |
$element = mosGetParam( $_REQUEST, 'element', '' ); |
| 18 |
$client = mosGetParam( $_REQUEST, 'client', '' ); |
$client = mosGetParam( $_REQUEST, 'client', '' ); |
|
$path = $mosConfig_absolute_path . "/administrator/components/com_installer/$element/$element.php"; |
|
|
|
|
| 19 |
// ensure user has access to this function |
// ensure user has access to this function |
| 20 |
if ( !$acl->acl_check( 'administration', 'install', 'users', $my->usertype, $element . 's', 'all' ) ) { |
if ( !$acl->acl_check( 'administration', 'install', 'users', $my->usertype, $element . 's', 'all' ) ) { |
| 21 |
mosRedirect( 'index2.php', T_('You are not authorized to view this resource.') ); |
mosRedirect( 'index2.php', T_('You are not authorized to view this resource.') ); |
| 23 |
|
|
| 24 |
// map the element to the required derived class |
// map the element to the required derived class |
| 25 |
$classMap = array( |
$classMap = array( |
| 26 |
'component' => 'mosInstallerComponent', |
'universal' => 'mosInstaller', |
| 27 |
'language' => 'mosInstallerLanguage', |
'component' => 'mosInstaller', |
| 28 |
'mambot' => 'mosInstallerMambot', |
'language' => 'mosInstaller', |
| 29 |
'module' => 'mosInstallerModule', |
'mambot' => 'mosInstaller', |
| 30 |
'template' => 'mosInstallerTemplate' |
'module' => 'mosInstaller', |
| 31 |
|
'template' => 'mosInstaller', |
| 32 |
|
'includes' => 'mosInstaller', |
| 33 |
|
'parameters' => 'mosInstaller' |
| 34 |
); |
); |
| 35 |
|
|
| 36 |
if (array_key_exists ( $element, $classMap )) { |
if (array_key_exists ( $element, $classMap )) { |
| 37 |
require_once( $mainframe->getPath( 'installer_class', $element ) ); |
// require_once( $mainframe->getPath( 'installer_class', $element ) ); |
| 38 |
|
|
| 39 |
switch ($task) { |
switch ($task) { |
| 40 |
|
|