PSR2 Cleanup: /html edition

Travis tests for code conformance. Ignore warnings for now.
Fixed all errors, left most warnings.
This commit is contained in:
Tony Murray
2016-08-18 20:28:22 -05:00
parent f0c82498b5
commit 8c639aa5a4
468 changed files with 6605 additions and 7629 deletions

View File

@@ -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,
)));