mirror of
https://github.com/unraid/webgui.git
synced 2026-01-06 01:29:54 -06:00
feat: caseModel passed to web components
This commit is contained in:
@@ -20,6 +20,18 @@ if (realpath(dirname($name)) == $root) {
|
||||
switch ($_POST['mode']??'') {
|
||||
case 'set':
|
||||
if ($model) file_put_contents($name,$model);
|
||||
/**
|
||||
* reset cookie so emhttp/plugins/dynamix.my.servers/include/state.php doesn't need to read the flash each page load
|
||||
* cookie is read in emhttp/plugins/dynamix.my.servers/include/state.php
|
||||
*/
|
||||
$cookieOptions = array (
|
||||
'expires' => time() + (10 * 365 * 24 * 60 * 60), // overkill
|
||||
'path' => '/',
|
||||
'secure' => false,
|
||||
'httponly' => false,
|
||||
'samesite' => 'Strict',
|
||||
);
|
||||
setcookie('caseModel', file_get_contents($name), $cookieOptions);
|
||||
break;
|
||||
case 'get':
|
||||
if (is_file($name)) echo file_get_contents($name);
|
||||
|
||||
Reference in New Issue
Block a user