mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
dbUpdate will return 0 if no data is changed
This commit is contained in:
@@ -37,7 +37,7 @@ else {
|
||||
$widget_settings = array();
|
||||
}
|
||||
if (dbFetchCell('select 1 from users_widgets inner join dashboards on users_widgets.dashboard_id = dashboards.dashboard_id where user_widget_id = ? && (users_widgets.user_id = ? || dashboards.access = 2)',array($widget_id,$_SESSION['user_id'])) == 1) {
|
||||
if (dbUpdate(array('settings'=>json_encode($widget_settings)),'users_widgets','user_widget_id=?',array($widget_id))) {
|
||||
if (dbUpdate(array('settings'=>json_encode($widget_settings)),'users_widgets','user_widget_id=?',array($widget_id)) >= 0) {
|
||||
$status = 'ok';
|
||||
$message = 'Updated';
|
||||
}
|
||||
|
Reference in New Issue
Block a user