mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
PSR2 Cleanup: /html edition
Travis tests for code conformance. Ignore warnings for now. Fixed all errors, left most warnings.
This commit is contained in:
@@ -26,15 +26,13 @@ header('Content-type: application/json');
|
||||
$status = 'error';
|
||||
$message = 'unknown error';
|
||||
if (isset($_REQUEST['dashboard_id']) && isset($_REQUEST['dashboard_name']) && isset($_REQUEST['access'])) {
|
||||
if(dbUpdate(array('dashboard_name'=>$_REQUEST['dashboard_name'],'access'=>$_REQUEST['access']),'dashboards','(user_id = ? || access = 2) && dashboard_id = ?',array($_SESSION['user_id'],$_REQUEST['dashboard_id']))) {
|
||||
if (dbUpdate(array('dashboard_name'=>$_REQUEST['dashboard_name'],'access'=>$_REQUEST['access']), 'dashboards', '(user_id = ? || access = 2) && dashboard_id = ?', array($_SESSION['user_id'],$_REQUEST['dashboard_id']))) {
|
||||
$status = 'ok';
|
||||
$message = 'Updated dashboard';
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$message = 'ERROR: Could not update dashboard '.$_REQUEST['dashboard_id'];
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$message = 'ERROR: Not enough params';
|
||||
}
|
||||
|
||||
@@ -42,4 +40,3 @@ die(json_encode(array(
|
||||
'status' => $status,
|
||||
'message' => $message,
|
||||
)));
|
||||
|
||||
|
Reference in New Issue
Block a user