mirror of
https://github.com/unraid/webgui.git
synced 2026-04-23 10:38:50 -05:00
Change state using socket call to emhttpd
This commit is contained in:
@@ -29,7 +29,7 @@ function toggle_state(device,name,action) {
|
||||
var button = '[id^=button-]';
|
||||
}
|
||||
pauseEvents(event);
|
||||
$.post('/webGui/include/ToggleState.php',{device:device,name:name,action:action},function(){resumeEvents(event);if (button) $(button).prop('disabled',false);});
|
||||
$.post('/webGui/include/ToggleState.php',{device:device,name:name,action:action,csrf:'<?=$var['csrf_token']?>'},function(){resumeEvents(event);if (button) $(button).prop('disabled',false);});
|
||||
}
|
||||
function display_diskio() {
|
||||
if ($.cookie('diskio')===undefined) {
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
$device = $_POST['device'];
|
||||
$name = $_POST['name'];
|
||||
$action = $_POST['action'];
|
||||
$var = parse_ini_file('state/var.ini');
|
||||
$csrf = $var['csrf_token'];
|
||||
$csrf = $_POST['csrf'];
|
||||
|
||||
function emhttpd($cmd) {
|
||||
global $csrf;
|
||||
|
||||
Reference in New Issue
Block a user