- fixed getResourcePath in RaspberryDisplay/Index.php
- fixed php7 compatibility in RaspberryDisplayController.php
This commit is contained in:
@@ -96,4 +96,4 @@ include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php")
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<script src="/js/pages/raspberryDisplay.js?<?=$git_merge_ts?>"></script>
|
<script src="<?=self::getResourcePath()?>js/pages/raspberryDisplay.js?<?=$git_merge_ts?>"></script>
|
||||||
@@ -86,13 +86,24 @@ class RaspberryDisplayController extends mfBaseController
|
|||||||
$this->redirect("dashboard");
|
$this->redirect("dashboard");
|
||||||
}
|
}
|
||||||
|
|
||||||
$return = match ($do) {
|
switch ($do) {
|
||||||
"getDisplays" => $this->getDisplaysApi(),
|
case "getDisplays":
|
||||||
"change" => $this->change(),
|
$return = $this->getDisplaysApi();
|
||||||
"reboot" => $this->restartRaspberryPi($this->request->displayID),
|
break;
|
||||||
"getConfig" => $this->getConfig(),
|
case "change":
|
||||||
default => false,
|
$return = $this->change();
|
||||||
};
|
break;
|
||||||
|
case "reboot":
|
||||||
|
$return = $this->restartRaspberryPi($this->request->displayID);
|
||||||
|
break;
|
||||||
|
case "getConfig":
|
||||||
|
$return = $this->getConfig();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$return = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$data = [];
|
$data = [];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user