/**
* @file mod/install.php
*/
+
use Friendica\App;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Database\DBStructure;
use Friendica\Object\Image;
+use Friendica\Util\Network;
+use Friendica\Util\Temporal;
$install_wizard_pass = 1;
$dbdata = notags(trim($_POST['dbdata']));
$phpath = notags(trim($_POST['phpath']));
+ $adminmail = notags(trim($_POST['adminmail']));
$tpl = get_markup_template('install_db.tpl');
$o .= replace_macros($tpl, [
return $o;
}; break;
case 3: { // Site settings
- require_once('include/datetime.php');
$dbhost = ((x($_POST, 'dbhost')) ? notags(trim($_POST['dbhost'])) : 'localhost');
$dbuser = notags(trim($_POST['dbuser']));
$dbpass = notags(trim($_POST['dbpass']));
'$adminmail' => ['adminmail', L10n::t('Site administrator email address'), $adminmail, L10n::t('Your account email address must match this in order to use the web admin panel.'), 'required', 'autofocus', 'email'],
- '$timezone' => field_timezone('timezone', L10n::t('Please select a default timezone for your website'), $timezone, ''),
+ '$timezone' => Temporal::getTimezoneField('timezone', L10n::t('Please select a default timezone for your website'), $timezone, ''),
'$language' => ['language', L10n::t('System Language:'), 'en', L10n::t('Set the default language for your Friendica installation interface and to send emails.'), $lang_choices],
'$baseurl' => System::baseUrl(),
list($result) = explode("\n", $result);
$help = "";
if (!$passed2) {
- $help .= L10n::t('PHP executable is not the php cli binary (could be cgi-fgci version)'). EOL;
+ $help .= L10n::t("PHP executable is not the php cli binary \x28could be cgi-fgci version\x29"). EOL;
$help .= L10n::t('Found PHP version: ')."<tt>$result</tt>";
}
check_add($checks, L10n::t('PHP cli binary'), $passed2, true, $help);
$status = false;
$help = L10n::t('Friendica uses the Smarty3 template engine to render its web views. Smarty3 compiles templates to PHP to speed up rendering.') .EOL;
$help .= L10n::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 .= L10n::t('Please ensure that the user that your web server runs as (e.g. www-data) has write access to this folder.').EOL;
- $help .= L10n::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;
+ $help .= L10n::t("Please ensure that the user that your web server runs as \x28e.g. www-data\x29 has write access to this folder.").EOL;
+ $help .= L10n::t("Note: as a security measure, you should give the web server write access to view/smarty3/ only--not the template files \x28.tpl\x29 that it contains.").EOL;
}
check_add($checks, L10n::t('view/smarty3 is writable'), $status, true, $help);
$status = true;
$help = "";
if (function_exists('curl_init')) {
- $test = fetch_url(System::baseUrl()."/install/testrewrite");
+ $test = Network::fetchUrl(System::baseUrl()."/install/testrewrite");
if ($test != "ok") {
- $test = fetch_url(normalise_link(System::baseUrl()."/install/testrewrite"));
+ $test = Network::fetchUrl(normalise_link(System::baseUrl()."/install/testrewrite"));
}
if ($test != "ok") {
function what_next() {
$baseurl = System::baseUrl();
return
- t('<h1>What next</h1>')
- ."<p>".t('IMPORTANT: You will need to [manually] setup a scheduled task for the worker.')
- .t('Please see the file "INSTALL.txt".')
+ L10n::t('<h1>What next</h1>')
+ ."<p>".L10n::t('IMPORTANT: You will need to [manually] setup a scheduled task for the worker.')
+ .L10n::t('Please see the file "INSTALL.txt".')
."</p><p>"
- .t("Go to your new Friendica node <a href='$baseurl/register'>registration page</a> and register as new user. Remember to use the same email you have entered as administrator email. This will allow you to enter the site admin panel.")
+ .L10n::t('Go to your new Friendica node <a href="%s/register">registration page</a> and register as new user. Remember to use the same email you have entered as administrator email. This will allow you to enter the site admin panel.', $baseurl)
."</p>";
}