Esempio n. 1
0
    case 'data':
        $adminAllowed = $tmpUser->checkPermission('RDATA');
        switch ($extensiontype) {
            default:
            case 'import':
                $extensiontype = EXTENSION_IMPORT;
                break;
            case 'export':
                $extensiontype = EXTENSION_EXPORT;
                break;
        }
        break;
}
if ($adminAllowed) {
    $extensionMgr = new ExtensionMgr();
    $extensionMgr->refreshList($this->approot . $this->extensiondir);
    $extensions = $extensionMgr->getList($extensiontype, $only_installed, true);
    // Filter out self-controlled extensions
    if ($selectiondialog || $objecttype == 'data') {
        $real_extensions = array();
        foreach ($extensions as $extensionItem) {
            $currExtension = $extensionMgr->getExtension($extensionItem['CODE']);
            if ($currExtension && $currExtension->info['ASSIGNMENT'] != EXTENSION_ASSIGNMENT_EXT_CONTROLLED) {
                $real_extensions[] = $extensionItem;
            }
        }
        $extensions = $real_extensions;
    }
}
$smarty->assign('mode', $mode);
$smarty->assign('extensioncount', count($extensions));