Exemple #1
0
function _moduleContent(&$smarty, $module_name)
{
    //include module files
    require_once "modules/{$module_name}/configs/default.conf.php";
    require_once "modules/{$module_name}/libs/PaloSantoPackages.class.php";
    load_language_module($module_name);
    //global variables
    global $arrConf;
    global $arrConfModule;
    $arrConf = array_merge($arrConf, $arrConfModule);
    //folder path for custom templates
    $base_dir = dirname($_SERVER['SCRIPT_FILENAME']);
    $templates_dir = isset($arrConf['templates_dir']) ? $arrConf['templates_dir'] : 'themes';
    $local_templates_dir = "{$base_dir}/modules/{$module_name}/" . $templates_dir . '/' . $arrConf['theme'];
    $action = getParameter('action');
    switch ($action) {
        case 'updateRepositories':
            return actualizarRepositorios($arrConf);
        case 'install':
            return installPaquete($arrConf);
        case 'uninstall':
            return uninstallPaquete($arrConf);
        default:
            return listPackages($smarty, $module_name, $local_templates_dir, $arrConf);
    }
}
Exemple #2
0
function _moduleContent(&$smarty, $module_name)
{
    //global variables
    global $arrConf;
    global $arrConfModule;
    $arrConf = array_merge($arrConf, $arrConfModule);
    //folder path for custom templates
    $local_templates_dir = getWebDirModule($module_name);
    $action = getParameter('action');
    switch ($action) {
        case 'updateRepositories':
            return actualizarRepositorios($arrConf);
        case 'install':
            return installPaquete($arrConf);
        case 'uninstall':
            return uninstallPaquete($arrConf);
        default:
            return listPackages($smarty, $module_name, $local_templates_dir, $arrConf);
    }
}