mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-06-05 09:23:40 -04:00
Makes custom headers/footers optional. Disabled by default.
This commit is contained in:
parent
20858a1f43
commit
cbdd185602
4 changed files with 30 additions and 20 deletions
|
@ -7,8 +7,8 @@ class Customize {
|
|||
|
||||
$absPath = $h5ai->getAbsPath();
|
||||
$options = $h5ai->getOptions();
|
||||
$this->customHeader = $absPath . "/" . $options["customHeader"];
|
||||
$this->customFooter = $absPath . "/" . $options["customFooter"];
|
||||
$this->customHeader = $options["customHeader"] ? $absPath . "/" . $options["customHeader"] : false;
|
||||
$this->customFooter = $options["customFooter"] ? $absPath . "/" . $options["customFooter"] : false;
|
||||
}
|
||||
|
||||
public function getHeader() {
|
||||
|
@ -23,7 +23,7 @@ class Customize {
|
|||
|
||||
private function getContent($file, $tag) {
|
||||
|
||||
return file_exists($file) ? ("<" . $tag . ">" . file_get_contents($file) . "</" . $tag . ">") : "";
|
||||
return (is_string($file) && file_exists($file)) ? ("<" . $tag . ">" . file_get_contents($file) . "</" . $tag . ">") : "";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue