X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Finstall.php;h=0da8ec040f2a11d59bd587a033cc51b87cc2fe2f;hb=3359f3f5c7ecc4b6a34c4fcfc095ab4dd5fab0f1;hp=aa891dba752b390c495702afa61bb8b93d2d33b8;hpb=20043914e6111ba53df85e1efd3389c99d37302f;p=friendica.git diff --git a/mod/install.php b/mod/install.php index aa891dba75..0da8ec040f 100755 --- a/mod/install.php +++ b/mod/install.php @@ -1,8 +1,11 @@ config['system']['theme'] = "../install"; - $a->theme['stylesheet'] = App::get_baseurl()."/view/install/style.css"; + $a->theme['stylesheet'] = System::baseUrl()."/view/install/style.css"; global $install_wizard_pass; if (x($_POST, 'pass')) { @@ -27,7 +30,7 @@ function install_init(App $a) { } function install_post(App $a) { - global $install_wizard_pass, $db; + global $install_wizard_pass; switch($install_wizard_pass) { case 1: @@ -43,9 +46,7 @@ function install_post(App $a) { $phpath = notags(trim($_POST['phpath'])); require_once("include/dba.php"); - unset($db); - $db = new dba($dbhost, $dbuser, $dbpass, $dbdata, true); - if (!$db->connected) { + if (!dba::connect($dbhost, $dbuser, $dbpass, $dbdata, true)) { $a->data['db_conn_failed'] = true; } @@ -64,7 +65,7 @@ function install_post(App $a) { $rino = 2; // connect to db - $db = new dba($dbhost, $dbuser, $dbpass, $dbdata, true); + dba::connect($dbhost, $dbuser, $dbpass, $dbdata, true); $tpl = get_markup_template('htconfig.tpl'); $txt = replace_macros($tpl,array( @@ -86,7 +87,7 @@ function install_post(App $a) { $a->data['txt'] = $txt; } - $errors = load_database($db); + $errors = load_database(); if ($errors) { @@ -102,7 +103,7 @@ function install_post(App $a) { function install_content(App $a) { - global $install_wizard_pass, $db; + global $install_wizard_pass; $o = ''; $wizard_status = ""; $install_title = t('Friendica Communications Server - Setup'); @@ -132,9 +133,9 @@ function install_content(App $a) { $db_return_text .= $txt; } - if ($db && $db->connected) { + if (dba::$connected) { $r = q("SELECT COUNT(*) as `total` FROM `user`"); - if (dbm::is_result($r) && $r[0]['total']) { + if (DBM::is_result($r) && $r[0]['total']) { $tpl = get_markup_template('install.tpl'); return replace_macros($tpl, array( '$title' => $install_title, @@ -203,7 +204,7 @@ function install_content(App $a) { '$next' => t('Next'), '$reload' => t('Check again'), '$phpath' => $phpath, - '$baseurl' => App::get_baseurl(), + '$baseurl' => System::baseUrl(), )); return $o; }; break; @@ -237,7 +238,7 @@ function install_content(App $a) { '$lbl_10' => t('Please select a default timezone for your website'), - '$baseurl' => App::get_baseurl(), + '$baseurl' => System::baseUrl(), '$phpath' => $phpath, @@ -277,7 +278,7 @@ function install_content(App $a) { '$timezone' => field_timezone('timezone', t('Please select a default timezone for your website'), $timezone, ''), '$language' => array('language', t('System Language:'), 'en', t('Set the default language for your Friendica installation interface and to send emails.'), $lang_choices), - '$baseurl' => App::get_baseurl(), + '$baseurl' => System::baseUrl(), @@ -317,7 +318,7 @@ function check_php(&$phpath, &$checks) { $help = ""; if (!$passed) { $help .= t('Could not find a command line version of PHP in the web server PATH.'). EOL; - $help .= t("If you don't have a command line version of PHP installed on server, you will not be able to run the background processing. See 'Setup the poller'") . EOL; + $help .= t("If you don't have a command line version of PHP installed on your server, you will not be able to run the background processing. See 'Setup the worker'") . EOL; $help .= EOL . EOL; $tpl = get_markup_template('field_input.tpl'); $help .= replace_macros($tpl, array( @@ -479,10 +480,10 @@ function check_htaccess(&$checks) { $status = true; $help = ""; if (function_exists('curl_init')) { - $test = fetch_url(App::get_baseurl()."/install/testrewrite"); + $test = fetch_url(System::baseUrl()."/install/testrewrite"); if ($test != "ok") { - $test = fetch_url(normalise_link(App::get_baseurl()."/install/testrewrite")); + $test = fetch_url(normalise_link(System::baseUrl()."/install/testrewrite")); } if ($test != "ok") { @@ -533,7 +534,7 @@ function load_database_rem($v, $i) { } } -function load_database($db) { +function load_database() { require_once("include/dbstructure.php"); $errors = update_structure(false, true); @@ -542,10 +543,10 @@ function load_database($db) { } function what_next() { - $baseurl = App::get_baseurl(); + $baseurl = System::baseUrl(); return t('

What next

') - ."

".t('IMPORTANT: You will need to [manually] setup a scheduled task for the poller.') + ."

".t('IMPORTANT: You will need to [manually] setup a scheduled task for the worker.') .t('Please see the file "INSTALL.txt".') ."

" .t("Go to your new Friendica node registration page 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.")