]> git.mxchange.org Git - friendica.git/blobdiff - mod/install.php
revup
[friendica.git] / mod / install.php
index b5f056df7c0537eeb67709714996ad9a9ebb0bb3..970ff6af8f09ccfdbf3f171181f58054f18217a6 100644 (file)
@@ -12,6 +12,7 @@ function install_post(&$a) {
        $dbdata = notags(trim($_POST['dbdata']));
        $timezone = notags(trim($_POST['timezone']));
        $phpath = notags(trim($_POST['phpath']));
+       $adminmail = notags(trim($_POST['adminmail']));
 
        require_once("dba.php");
        unset($db);
@@ -35,7 +36,7 @@ function install_post(&$a) {
                }
        }
 
-       notice( t('Connected to database.') . EOL);
+       info( t('Connected to database.') . EOL);
 
        $tpl = get_intltext_template('htconfig.tpl');
        $txt = replace_macros($tpl,array(
@@ -45,8 +46,10 @@ function install_post(&$a) {
                '$dbdata' => $dbdata,
                '$timezone' => $timezone,
                '$urlpath' => $urlpath,
-               '$phpath' => $phpath
+               '$phpath' => $phpath,
+               '$adminmail' => $adminmail
        ));
+
        $result = file_put_contents('.htconfig.php', $txt);
        if(! $result) {
                $a->data = $txt;
@@ -95,7 +98,7 @@ function install_content(&$a) {
                }
        }
 
-       notice( t('Welcome to Friendika.') . EOL);
+       info( t('Welcome to Friendika.') . EOL);
 
 
        check_funcs();
@@ -128,6 +131,7 @@ function install_content(&$a) {
                '$lbl_08' => t('Database Login Password'),
                '$lbl_09' => t('Database Name'),
                '$lbl_10' => t('Please select a default timezone for your website'),
+               '$lbl_11' => t('Site administrator email address. Your account email address will need match this.'), 
                '$baseurl' => $a->get_baseurl(),
                '$tzselect' => ((x($_POST,'timezone')) ? select_timezone($_POST['timezone']) : select_timezone()),
                '$submit' => t('Submit'),
@@ -135,7 +139,8 @@ function install_content(&$a) {
                '$dbuser' => notags(trim($_POST['dbuser'])),
                '$dbpass' => notags(trim($_POST['dbpass'])),
                '$dbdata' => notags(trim($_POST['dbdata'])),
-               '$phpath' => $phpath
+               '$phpath' => $phpath,
+               '$adminmail' => notags(trim($_POST['adminmail']))
        ));
 
        return $o;
@@ -194,7 +199,10 @@ function check_funcs() {
        if(! function_exists('openssl_public_encrypt')) 
                notice( t('Error: openssl PHP module required but not installed.') . EOL);      
        if(! function_exists('mysqli_connect')) 
-               notice( t('Error: mysqli PHP module required but not installed.') . EOL);       
+               notice( t('Error: mysqli PHP module required but not installed.') . EOL);
+       if(! function_exists('mb_strlen'))
+               notice( t('Error: mb_string PHP module required but not installed.') . EOL);
+       
        if((x($_SESSION,'sysmsg')) && strlen($_SESSION['sysmsg']))
                notice( t('Please see the file "INSTALL.txt".') . EOL);
 }
@@ -238,4 +246,4 @@ function load_database($db) {
                }
        }
        return $errors;
-}
\ No newline at end of file
+}