mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
fix renderTemplate() function to allow data-less rendering
This commit is contained in:
parent
6985322ca0
commit
5a49768614
@ -578,9 +578,9 @@ function SaveTORAndVPNConfig()
|
|||||||
/**
|
/**
|
||||||
* Renders a simple PHP template
|
* 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)) {
|
if (!file_exists($file)) {
|
||||||
return "template $name ($file) not found";
|
return "template $name ($file) not found";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user