Example #1
0
/**
 * Generates the form for generating makefiles (for generating Drupal sites :)
 */
function formMakefile($v)
{
    $output = '';
    $output .= formCores($v);
    $output .= '<fieldset id="fs-contrib">
    <legend><p>Modules</p></legend>';
    $output .= formModules($v);
    $output .= '</fieldset>
  <fieldset id="fs-themes">
    <legend><p>Themes</p></legend>';
    $output .= formThemes($v);
    $output .= '</fieldset>
  <fieldset id="fs-libs">
    <legend><p>Libraries</p></legend>';
    $output .= formLibs($v);
    $output .= '</fieldset>
  <fieldset id="fs-opts">
    <legend><p>Options</p></legend>';
    $output .= formOpts($v);
    $output .= '</fieldset>';
    return $output;
}
Example #2
0
function saveThemes($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $uid)
{
    $oThemes = new PaloSantoThemes($pDB);
    $arr_themes = $oThemes->getThemes("/var/www/html/admin/web/themes/");
    $formThemes = createFieldForm($arr_themes);
    $oForm = new paloForm($smarty, $formThemes);
    $exito = $oThemes->updateTheme($_POST['themes'], $uid);
    if ($exito) {
        if ($oThemes->smartyRefresh($_SERVER['DOCUMENT_ROOT'])) {
            header("Location: index.php?menu=themes_system");
            die;
        } else {
            $smarty->assign("mb_title", _tr("ERROR"));
            $smarty->assign("mb_message", _tr("The smarty cache could not be deleted"));
        }
    } else {
        $smarty->assign("mb_title", _tr("Validation Error"));
        $smarty->assign("mb_message", $oThemes->errMsg);
    }
    return formThemes($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $uid);
}