$dbdata = notags(trim($_POST['dbdata']));
$phpath = notags(trim($_POST['phpath']));
- require_once("dba.php");
+ require_once("include/dba.php");
unset($db);
$db = new dba($dbhost, $dbuser, $dbpass, $dbdata, true);
/*if(get_db_errno()) {
check_htconfig($checks);
+ check_smarty3($checks);
+
check_keys($checks);
if(x($_POST,'phpath'))
$tpl = get_markup_template('install_db.tpl');
-
- $includes = array(
- '$field_input' => 'field_input.tpl',
- '$field_password' => 'field_password.tpl',
- );
- $includes = set_template_includes($a->theme['template_engine'], $includes);
-
- $o .= replace_macros($tpl,$includes + array(
+ $o .= replace_macros($tpl, array(
'$title' => $install_title,
'$pass' => t('Database connection'),
'$info_01' => t('In order to install Friendica we need to know how to connect to your database.'),
return $o;
}; break;
case 3: { // Site settings
- require_once('datetime.php');
+ require_once('include/datetime.php');
$dbhost = ((x($_POST,'dbhost')) ? notags(trim($_POST['dbhost'])) : 'localhost');
$dbuser = notags(trim($_POST['dbuser']));
$dbpass = notags(trim($_POST['dbpass']));
$timezone = ((x($_POST,'timezone')) ? ($_POST['timezone']) : 'America/Los_Angeles');
$tpl = get_markup_template('install_settings.tpl');
-
- $includes = array(
- '$field_input' => 'field_input.tpl',
- );
- $includes = set_template_includes($a->theme['template_engine'], $includes);
-
- $o .= replace_macros($tpl, $includes + array(
+ $o .= replace_macros($tpl, array(
'$title' => $install_title,
'$pass' => t('Site settings'),
}
+function check_smarty3(&$checks) {
+ $status = true;
+ $help = "";
+ if( !is_writable('view/smarty3') ) {
+
+ $status=false;
+ $help = t('Friendica uses the Smarty3 template engine to render its web views. Smarty3 compiles templates to PHP to speed up rendering.') .EOL;
+ $help .= t('In order to store these compiled templates, the web server needs to have write access to the directory view/smarty3/ under the Friendica top level folder.').EOL;
+ $help .= t('Please ensure that the user that your web server runs as (e.g. www-data) has write access to this folder.').EOL;
+ $help .= t('Note: as a security measure, you should give the web server write access to view/smarty3/ only--not the template files (.tpl) that it contains.').EOL;
+ }
+
+ check_add($checks, t('view/smarty3 is writable'), $status, true, $help);
+
+}
+
function check_htaccess(&$checks) {
$a = get_app();
$status = true;