From 9065abdb989d6e3c1c9ad708125444de2bd8c993 Mon Sep 17 00:00:00 2001 From: Ian Date: Tue, 27 Mar 2012 13:00:37 +0200 Subject: [PATCH] smartify installer without fail ... :D --- include/admin/installer.inc.php | 11 +++++++++-- include/serendipity_smarty_class.inc.php | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/include/admin/installer.inc.php b/include/admin/installer.inc.php index 20c23bab..85d12f32 100644 --- a/include/admin/installer.inc.php +++ b/include/admin/installer.inc.php @@ -387,9 +387,16 @@ if (!is_object($serendipity['smarty'])) { $serendipity['smarty']->assign($data); $tfile = dirname(__FILE__) . "/tpl/installer.inc.tpl"; +ob_start(); +include $tfile; +$content = ob_get_contents(); +ob_end_clean(); -$content = $serendipity['smarty']->fetch('file:'. $tfile); // short notation with Smarty3 in S9y 1.7 and up +#$content = $serendipity['smarty']->fetch('file:'. $tfile); // short notation with Smarty3 in S9y 1.7 and up +#echo $content; + +// eval a string template and do not store compiled code +echo $serendipity['smarty']->display('eval:'.$content); -echo $content; /* vim: set sts=4 ts=4 expandtab : */ diff --git a/include/serendipity_smarty_class.inc.php b/include/serendipity_smarty_class.inc.php index 70ab5311..b9bf3256 100644 --- a/include/serendipity_smarty_class.inc.php +++ b/include/serendipity_smarty_class.inc.php @@ -1,4 +1,4 @@ -setConfigDir(array(S9Y_TEMPLATE_USERDEFAULT)); - if (!is_dir($this->getCompileDir()) || !is_writable($this->getCompileDir())) { + if (!is_dir($this->getCompileDir()) || !is_writable($this->getCompileDir()) && IN_installer !== true) { if(ini_get('display_errors') == 0 || ini_get('display_errors') == 'off') printf(DIRECTORY_WRITE_ERROR, $this->getCompileDir()); trigger_error(sprintf(DIRECTORY_WRITE_ERROR, $this->getCompileDir()), E_USER_ERROR); }