Exemplo n.º 1
0
                if ($config->validate($newPropertyList)) {
                    // save config file
                    if ($config->save()) {
                        $dialogBox->success(get_lang('Properties for %config_name, (%config_code) are now effective on server.', array('%config_name' => get_lang($config_name), '%config_code' => $config_code)));
                    } else {
                        $error = true;
                        $dialogBox->error($config->backlog->output());
                    }
                } else {
                    // not valid
                    $error = true;
                    $dialogBox->error($config->backlog->output());
                }
            }
            // display form
            $form .= $config->display_form($newPropertyList, $section);
        } else {
            // display form
            $form .= $config->display_form(null, $section);
        }
    } else {
        // error loading the configuration
        $error = true;
        $dialogBox->error($config->backlog->output());
    }
    if ($config->is_modified()) {
        $dialogBox->warning(get_lang('Note. This configuration file has been manually changed. The system will try to retrieve all the configuration values, but it can not guarantee to retrieve additional settings manually inserted'));
    }
}
if (!isset($config_name)) {
    $nameTools = get_lang('Configuration');