|
|
@ -21,17 +21,35 @@ class SettingsAPI
|
|
|
|
file_get_contents("../content/themes/" . $theme . "/theme.json"),
|
|
|
|
file_get_contents("../content/themes/" . $theme . "/theme.json"),
|
|
|
|
true
|
|
|
|
true
|
|
|
|
);
|
|
|
|
);
|
|
|
|
//if render flag is set and false, just render index page for one page sites
|
|
|
|
//check to see if dynamic rendering is active
|
|
|
|
//otherwise, render all pages according to theme template files
|
|
|
|
if (
|
|
|
|
$render = new Render();
|
|
|
|
isset($settings["global"]["dynamicRender"]) &&
|
|
|
|
if (isset($themeConfig["render"])) {
|
|
|
|
$settings["global"]["dynamicRender"] === "true"
|
|
|
|
if (!$themeConfig["render"] || $themeConfig["render"] === "false") {
|
|
|
|
) {
|
|
|
|
$render->renderIndex();
|
|
|
|
$result = [
|
|
|
|
$result = [
|
|
|
|
"message" => "Dynamic Render Active! You're good!",
|
|
|
|
"message" => "Index Rendered. HAND CLAPS",
|
|
|
|
"type" => "RENDER_SUCCESS",
|
|
|
|
"type" => "RENDER_SUCCESS",
|
|
|
|
];
|
|
|
|
];
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$render = new Render();
|
|
|
|
|
|
|
|
if (isset($themeConfig["render"])) {
|
|
|
|
|
|
|
|
if (!$themeConfig["render"] || $themeConfig["render"] === "false") {
|
|
|
|
|
|
|
|
$render->renderIndex();
|
|
|
|
|
|
|
|
$result = [
|
|
|
|
|
|
|
|
"message" => "Index Rendered. HAND CLAPS",
|
|
|
|
|
|
|
|
"type" => "RENDER_SUCCESS",
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$render->renderTags();
|
|
|
|
|
|
|
|
$render->renderArchive();
|
|
|
|
|
|
|
|
$render->renderPages();
|
|
|
|
|
|
|
|
$result = [
|
|
|
|
|
|
|
|
"message" => "Site Rendered. GOOD EFFORT",
|
|
|
|
|
|
|
|
"type" => "RENDER_SUCCESS",
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
// just incase the render flag is missing
|
|
|
|
$render->renderTags();
|
|
|
|
$render->renderTags();
|
|
|
|
$render->renderArchive();
|
|
|
|
$render->renderArchive();
|
|
|
|
$render->renderPages();
|
|
|
|
$render->renderPages();
|
|
|
@ -40,17 +58,11 @@ class SettingsAPI
|
|
|
|
"type" => "RENDER_SUCCESS",
|
|
|
|
"type" => "RENDER_SUCCESS",
|
|
|
|
];
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
|
|
|
|
// just incase the render flag is missing
|
|
|
|
|
|
|
|
$render->renderTags();
|
|
|
|
|
|
|
|
$render->renderArchive();
|
|
|
|
|
|
|
|
$render->renderPages();
|
|
|
|
|
|
|
|
$result = [
|
|
|
|
|
|
|
|
"message" => "Site Rendered. GOOD EFFORT",
|
|
|
|
|
|
|
|
"type" => "RENDER_SUCCESS",
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//if render flag is set and false, just render index page for one page sites
|
|
|
|
|
|
|
|
//otherwise, render all pages according to theme template files
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case "add-avatar":
|
|
|
|
case "add-avatar":
|
|
|
|
$result = ImagesAPI::uploadImage($request, "avatar");
|
|
|
|
$result = ImagesAPI::uploadImage($request, "avatar");
|
|
|
|