mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
webui: Allow admin users to modify hostnames in web UI #3445
This commit is contained in:
committed by
Neil Lathwood
parent
79d3daabf2
commit
0955d0271e
@@ -212,8 +212,12 @@ function renamehost($id, $new, $source = 'console')
|
||||
dbUpdate(array('hostname' => $new), 'devices', 'device_id=?', array($id));
|
||||
log_event("Hostname changed -> $new ($source)", $id, 'system');
|
||||
} else {
|
||||
echo "Renaming of $host failed\n";
|
||||
log_event("Renaming of $host failed", $id, 'system');
|
||||
if (__FILE__ === $_SERVER['SCRIPT_FILE_NAME']) {
|
||||
echo "Renaming of $host failed\n";
|
||||
} else {
|
||||
return "Renaming of $host failed\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user