2 /* vim: set expandtab sw=4 ts=4 sts=4: */
6 * @package PhpMyAdmin-Setup
12 require './lib/common.inc.php';
14 $validators = array();
15 require './libraries/config/Validator.class.php';
17 header('Content-type: application/json');
19 $ids = isset($_POST['id']) ?
$_POST['id'] : null;
20 $vids = explode(',', $ids);
21 $vals = isset($_POST['values']) ?
$_POST['values'] : null;
22 $values = json_decode($vals);
23 if (!($values instanceof stdClass
)) {
24 PMA_fatalError(__('Wrong data'));
26 $values = (array)$values;
27 $result = PMA_Validator
::validate($GLOBALS['ConfigFile'], $vids, $values, true);
28 if ($result === false) {
29 $result = 'Wrong data or no validation for ' . $vids;
31 echo $result !== true ?
json_encode($result) : '';