Ejemplo n.º 1
0
            $input->theme = $form->theme;
        } else {
            $Errors[] = erTranslationClassLhTranslation::getInstance()->getTranslation('system/languages', 'Please enter theme');
        }
        if ($form->hasValidData('module') && $form->module != '') {
            $input->module = $form->module;
        } else {
            $Errors[] = erTranslationClassLhTranslation::getInstance()->getTranslation('system/languages', 'Please enter module name');
        }
        if ($form->hasValidData('view') && $form->view != '') {
            $input->view = $form->view;
        } else {
            $Errors[] = erTranslationClassLhTranslation::getInstance()->getTranslation('system/languages', 'Please enter view name');
        }
        if (empty($Errors)) {
            erLhcoreClassSiteaccessGenerator::updateSiteAccess($input);
            // Clean cache
            $CacheManager = erConfigClassLhCacheConfig::getInstance();
            $CacheManager->expireCache();
            // Redirect for change to take effect
            erLhcoreClassModule::redirect('system/languages', '/(updated)/true/(sa)/' . $input->siteaccess);
            exit;
        } else {
            $tpl->set('errors', $Errors);
        }
    }
}
$cfgSite = erConfigClassLhConfig::getInstance();
$tpl->set('locales', $cfgSite->getSetting('site', 'available_site_access'));
$tpl->set('current_site_access', erLhcoreClassSystem::instance()->SiteAccess);
$tpl->set('input', $input);