user preferences saving and integration
This commit is contained in:
@@ -29,7 +29,7 @@ if (PMA_ifSetOr($_POST['submit_clear'], '')) {
|
||||
//
|
||||
// Clear current config and return to main page
|
||||
//
|
||||
$_SESSION['ConfigFile'] = array();
|
||||
ConfigFile::getInstance()->resetConfigData();
|
||||
// drop post data
|
||||
header('HTTP/1.1 303 See Other');
|
||||
header('Location: index.php');
|
||||
@@ -56,7 +56,7 @@ if (PMA_ifSetOr($_POST['submit_clear'], '')) {
|
||||
//
|
||||
$cfg = array();
|
||||
require_once $config_file_path;
|
||||
$_SESSION['ConfigFile'] = $cfg;
|
||||
ConfigFile::getInstance()->setConfigData($cfg);
|
||||
header('HTTP/1.1 303 See Other');
|
||||
header('Location: index.php');
|
||||
exit;
|
||||
|
@@ -18,7 +18,7 @@ require_once './libraries/config/Form.class.php';
|
||||
require_once './libraries/config/FormDisplay.class.php';
|
||||
require_once './setup/lib/form_processing.lib.php';
|
||||
|
||||
require './setup/lib/forms.inc.php';
|
||||
require './libraries/config/setup.forms.php';
|
||||
|
||||
$formsets = array(
|
||||
'features' => array(
|
||||
|
@@ -116,7 +116,7 @@ display_form_top('index.php', 'get', array(
|
||||
<th><?php echo __('Authentication type') ?></th>
|
||||
<th colspan="2">DSN</th>
|
||||
</tr>
|
||||
<?php foreach ($_SESSION['ConfigFile']['Servers'] as $id => $server): ?>
|
||||
<?php foreach ($cf->getServers() as $id => $server): ?>
|
||||
<tr>
|
||||
<td><?php echo $id ?></td>
|
||||
<td><?php echo $cf->getServerName($id) ?></td>
|
||||
@@ -189,7 +189,7 @@ if ($cf->getServerCount() > 0) {
|
||||
}
|
||||
$opts['values_disabled'][] = '-';
|
||||
|
||||
foreach ($_SESSION['ConfigFile']['Servers'] as $id => $server) {
|
||||
foreach ($cf->getServers() as $id => $server) {
|
||||
$opts['values'][(string)$id] = $cf->getServerName($id) . " [$id]";
|
||||
}
|
||||
} else {
|
||||
|
@@ -18,7 +18,7 @@ require_once './libraries/config/Form.class.php';
|
||||
require_once './libraries/config/FormDisplay.class.php';
|
||||
require_once './setup/lib/form_processing.lib.php';
|
||||
|
||||
require './setup/lib/forms.inc.php';
|
||||
require './libraries/config/setup.forms.php';
|
||||
|
||||
$mode = filter_input(INPUT_GET, 'mode');
|
||||
$id = filter_input(INPUT_GET, 'id', FILTER_VALIDATE_INT);
|
||||
|
@@ -30,9 +30,6 @@ restore_error_handler();
|
||||
// Save current language in a cookie, required since we use PMA_MINIMUM_COMMON
|
||||
$GLOBALS['PMA_Config']->setCookie('pma_lang', $GLOBALS['lang']);
|
||||
|
||||
if (!isset($_SESSION['ConfigFile'])) {
|
||||
$_SESSION['ConfigFile'] = array();
|
||||
}
|
||||
ConfigFile::getInstance()->setPersistKeys(array(
|
||||
'DefaultLang',
|
||||
'ServerDefault',
|
||||
|
Reference in New Issue
Block a user