]> git.mxchange.org Git - friendica.git/blobdiff - mod/install.php
Merge pull request #4618 from tobiasd/210180317-htconfig
[friendica.git] / mod / install.php
index ef9f023f52bb1c2f04acfe625f76d0da19321945..4b4940d2777e27ec1a4ef33b6317fe4f1c41e820 100644 (file)
@@ -2,6 +2,7 @@
 /**
  * @file mod/install.php
  */
+
 use Friendica\App;
 use Friendica\Core\L10n;
 use Friendica\Core\System;
@@ -9,6 +10,7 @@ use Friendica\Database\DBM;
 use Friendica\Database\DBStructure;
 use Friendica\Object\Image;
 use Friendica\Util\Network;
+use Friendica\Util\Temporal;
 
 $install_wizard_pass = 1;
 
@@ -220,6 +222,7 @@ function install_content(App $a) {
                        $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, [
@@ -251,7 +254,6 @@ function install_content(App $a) {
                        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']));
@@ -279,7 +281,7 @@ function install_content(App $a) {
                                '$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(),
 
@@ -483,10 +485,10 @@ function check_htaccess(&$checks) {
        $status = true;
        $help = "";
        if (function_exists('curl_init')) {
-               $test = Network::fetchURL(System::baseUrl()."/install/testrewrite");
+               $test = Network::fetchUrl(System::baseUrl()."/install/testrewrite");
 
                if ($test != "ok") {
-                       $test = Network::fetchURL(normalise_link(System::baseUrl()."/install/testrewrite"));
+                       $test = Network::fetchUrl(normalise_link(System::baseUrl()."/install/testrewrite"));
                }
 
                if ($test != "ok") {
@@ -538,7 +540,7 @@ function load_database_rem($v, $i) {
 }
 
 function load_database() {
-       $errors = DBStructure::update(false, true);
+       $errors = DBStructure::update(false, true, true);
 
        return $errors;
 }