Refactor entry API: consolidate entry handling, update naming conventions, and enhance error reporting
This commit is contained in:
1 parent
205f2e2f73
commit
ad9290d2ad
9 files changed
+72
-12
No files matched your search
@@ -48,7 +48,7 @@ class HTMLLoader {
|
||||
|
||||
function setPage($page) {
|
||||
if (!array_key_exists($page, $this->template_conf)) {
|
||||
$this->showError("Page " . $page . " for template " . $this->template . " not found.");
|
||||
$this->showError('Page <span class="code">' . $page . '</span> for template <span class="code">' . $this->template . '</span> not found.');
|
||||
}else{
|
||||
$this->page = $page;
|
||||
}
|
||||
@@ -93,6 +93,10 @@ class HTMLLoader {
|
||||
|
||||
$page = $tempalte_conf[$this->page];
|
||||
|
||||
if (!is_file(TEMPLATE_PATH . $template_dir . "/" . $page["dir_name"] . "/" . $page["html_file"])) {
|
||||
$this->showError('HTML File <span class="code">' . $page["html_file"] . '</span> for page <span class="code">' . $page["name"] . '</span> in template <span class="code">' . $template . '</span> does not exists.');
|
||||
}
|
||||
|
||||
$html = file_get_contents(TEMPLATE_PATH . $template_dir . "/" . $page["dir_name"] . "/" . $page["html_file"]);
|
||||
|
||||
if ($showAppName) {
|
||||
|
||||
Reference in new issue
Block a user