mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-30 03:09:22 +02:00
pages in theme folder have precedence over normal pages
This commit is contained in:
parent
f40b986b59
commit
6d8f4718a1
@ -343,16 +343,16 @@ function getDatabasePages($withHidden = false): array
|
|||||||
|
|
||||||
function loadPageFromFileSystem($page, &$found): string
|
function loadPageFromFileSystem($page, &$found): string
|
||||||
{
|
{
|
||||||
$file = SYSTEM . 'pages/' . $page . '.php';
|
// feature: load pages from templates/ dir
|
||||||
|
global $template_path;
|
||||||
|
$file = $template_path . '/pages/' . $page . '.php';
|
||||||
if (!is_file($file)) {
|
if (!is_file($file)) {
|
||||||
// feature: convert camelCase to snake_case
|
$file = SYSTEM . 'pages/' . $page . '.php';
|
||||||
// so instead of forum/move_thread
|
|
||||||
// we can write: forum/moveThread
|
|
||||||
$file = SYSTEM . 'pages/' . camelCaseToUnderscore($page) . '.php';
|
|
||||||
if (!is_file($file)) {
|
if (!is_file($file)) {
|
||||||
// feature: load pages from templates/ dir
|
// feature: convert camelCase to snake_case
|
||||||
global $template_path;
|
// so instead of forum/move_thread
|
||||||
$file = $template_path . '/pages/' . $page . '.php';
|
// we can write: forum/moveThread
|
||||||
|
$file = SYSTEM . 'pages/' . camelCaseToUnderscore($page) . '.php';
|
||||||
if (!is_file($file)) {
|
if (!is_file($file)) {
|
||||||
$found = false;
|
$found = false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user