mirror of
https://github.com/atlanticbiomedical/portal-legacy.git
synced 2025-07-02 01:47:28 -04:00
initial commit
This commit is contained in:
30
html/phpmyad/setup/validate.php
Normal file
30
html/phpmyad/setup/validate.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?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) : '';
|
||||
?>
|
Reference in New Issue
Block a user