Translation update done using Pootle.
[phpmyadmin/tyronm.git] / setup / validate.php
blobbeeba71cee40e363040df5c4616d3f95e92a51dd
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Validation callback.
6 * @package phpMyAdmin-setup
7 */
9 /**
10 * Core libraries.
12 require './lib/common.inc.php';
14 $validators = array();
15 require './libraries/config/validate.lib.php';
17 header('Content-type: application/json');
19 $vids = explode(',', filter_input(INPUT_POST, 'id'));
20 $values = json_decode(filter_input(INPUT_POST, 'values'));
21 if (!($values instanceof stdClass)) {
22 die('Wrong data');
24 $values = (array)$values;
25 $result = PMA_config_validate($vids, $values, true);
26 if ($result === false) {
27 $result = 'Wrong data or no validation for ' . $vids;
29 echo $result !== true ? json_encode($result) : '';