1
0

smartify installer without fail ... :D

This commit is contained in:
Ian
2012-03-27 13:00:37 +02:00
parent 545b237894
commit 9065abdb98
2 changed files with 11 additions and 4 deletions

View File

@@ -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 : */

View File

@@ -1,4 +1,4 @@
<?php // (experimental) serendipity_smarty_class.inc.php 2012-02-20 10:26 Ian
<?php // (experimental) serendipity_smarty_class.inc.php 2012-03-27 12:52 Ian
// define secure_dir and trusted_dirs for Serendipity_Smarty_Security_Policy class.
@define('S9Y_TEMPLATE_FALLBACK', $serendipity['serendipityPath'] . $serendipity['templatePath'] . 'default');
@@ -148,7 +148,7 @@ class Serendipity_Smarty extends Smarty
$this->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);
}