mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-21 23:20:22 +00:00
fix renderTemplate() function to allow data-less rendering
This commit is contained in:
parent
6985322ca0
commit
5a49768614
1 changed files with 2 additions and 2 deletions
|
@ -578,9 +578,9 @@ function SaveTORAndVPNConfig()
|
|||
/**
|
||||
* Renders a simple PHP template
|
||||
*/
|
||||
function renderTemplate($name, $data)
|
||||
function renderTemplate($name, $data = [])
|
||||
{
|
||||
$file = "../../templates/$name.php";
|
||||
$file = realpath(dirname(__FILE__) . "/../templates/$name.php");
|
||||
if (!file_exists($file)) {
|
||||
return "template $name ($file) not found";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue