mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
Revert "Fix coding style old files (part 2)"
This commit is contained in:
@@ -13,19 +13,25 @@
|
||||
*/
|
||||
|
||||
// FUA
|
||||
if (!is_numeric($_POST['config_id']) || empty($_POST['data'])) {
|
||||
echo 'error with data';
|
||||
|
||||
if(!is_numeric($_POST['config_id']) || empty($_POST['data']))
|
||||
{
|
||||
echo('error with data');
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$data = mres($_POST['data']);
|
||||
$update = dbUpdate(array('config_value' => "$data"), 'config', '`config_id` = ?', array($_POST['config_id']));
|
||||
if(!empty($update) || $update == '0')
|
||||
{
|
||||
echo('success');
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo('error');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$data = mres($_POST['data']);
|
||||
$update = dbUpdate(array('config_value' => "$data"), 'config', '`config_id` = ?', array($_POST['config_id']));
|
||||
if (!empty($update) || $update == '0') {
|
||||
echo 'success';
|
||||
exit;
|
||||
}
|
||||
else {
|
||||
echo 'error';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user