Before throwing a 'smarty3 dir does not exist' fatal error, try and create it. We did try and create it during install, but the template processor is initalised long before we get to that code (and throws that ugly error).

This commit is contained in:
redmatrix 2016-08-28 22:24:27 -07:00
parent 810d9fefd9
commit 6b4cfe4f18
2 changed files with 6 additions and 3 deletions

View File

@ -43,11 +43,11 @@ class Setup extends \Zotlabs\Web\Controller {
killme();
}
if (x($_POST, 'pass'))
if (x($_POST, 'pass')) {
$this->install_wizard_pass = intval($_POST['pass']);
}
else {
$this->install_wizard_pass = 1;
@os_mkdir(TEMPLATE_BUILD_PATH, STORAGE_DEFAULT_PERMISSIONS, true);
}
}

View File

@ -15,7 +15,10 @@ class SmartyTemplate implements TemplateEngine {
? \App::$config['system']['smarty3_folder'] : '');
if (!$basecompiledir) $basecompiledir = str_replace('Zotlabs','',dirname(__dir__)) . "/" . TEMPLATE_BUILD_PATH;
if (!is_dir($basecompiledir)) {
echo "<b>ERROR:</b> folder <tt>$basecompiledir</tt> does not exist."; killme();
@os_mkdir(TEMPLATE_BUILD_PATH, STORAGE_DEFAULT_PERMISSIONS, true);
if (!is_dir($basecompiledir)) {
echo "<b>ERROR:</b> folder <tt>$basecompiledir</tt> does not exist."; killme();
}
}
if(!is_writable($basecompiledir)){
echo "<b>ERROR:</b> folder <tt>$basecompiledir</tt> must be writable by webserver."; killme();