Files
phpmyadmin/setup/validate.php
Crack 4a5ffa7a12 File comments:
- remove @license and @version from comments
- add vim settings
- change descriptions in form definition files
2010-08-03 00:55:57 +02:00

31 lines
681 B
PHP

<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Validation callback.
*
* @package phpMyAdmin-setup
*/
/**
* Core libraries.
*/
require './lib/common.inc.php';
$validators = array();
require './libraries/config/validate.lib.php';
header('Content-type: application/json');
$vids = explode(',', filter_input(INPUT_POST, 'id'));
$values = json_decode(filter_input(INPUT_POST, 'values'));
if (!($values instanceof stdClass)) {
die('Wrong data');
}
$values = (array)$values;
$result = PMA_config_validate($vids, $values, true);
if ($result === false) {
$result = 'Wrong data or no validation for ' . $vids;
}
echo $result !== true ? json_encode($result) : '';
?>