aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Setup.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-07-06 11:05:22 +0000
committerMario <mario@mariovavti.com>2024-07-06 11:05:22 +0000
commit45275910e606a02b12393714ea3b0409da440d61 (patch)
tree10b2d173d58cb930f8df28fe75af73dd4974c08c /Zotlabs/Module/Setup.php
parent0c1d0f7498661fb34dcca6f3c6566e757af310a7 (diff)
parentc04e781926a78e514cdf211fa24930a331149072 (diff)
downloadvolse-hubzilla-master.tar.gz
volse-hubzilla-master.tar.bz2
volse-hubzilla-master.zip
Merge branch '9.2RC'master
Diffstat (limited to 'Zotlabs/Module/Setup.php')
-rw-r--r--Zotlabs/Module/Setup.php31
1 files changed, 17 insertions, 14 deletions
diff --git a/Zotlabs/Module/Setup.php b/Zotlabs/Module/Setup.php
index 83faf85dc..35079e5e5 100644
--- a/Zotlabs/Module/Setup.php
+++ b/Zotlabs/Module/Setup.php
@@ -1,5 +1,4 @@
<?php
-namespace Zotlabs\Module;
/**
* @file Zotlabs/Module/Setup.php
*
@@ -8,10 +7,12 @@ namespace Zotlabs\Module;
* @todo This setup module could need some love and improvements.
*/
+namespace Zotlabs\Module;
+
+use Zotlabs\Lib\Config;
/**
- * @brief Initialisation for the setup module.
- *
+ * Controller for the initial setup/installation.
*/
class Setup extends \Zotlabs\Web\Controller {
@@ -45,9 +46,9 @@ class Setup extends \Zotlabs\Web\Controller {
}
if(x($_POST, 'pass')) {
- $this->install_wizard_pass = intval($_POST['pass']);
+ self::$install_wizard_pass = intval($_POST['pass']);
} else {
- $this->install_wizard_pass = 1;
+ self::$install_wizard_pass = 1;
}
}
@@ -57,7 +58,7 @@ class Setup extends \Zotlabs\Web\Controller {
*/
function post() {
- switch($this->install_wizard_pass) {
+ switch(self::$install_wizard_pass) {
case 1:
case 2:
return;
@@ -179,18 +180,18 @@ class Setup extends \Zotlabs\Web\Controller {
$install_title = t('$Projectname Server - Setup');
if(x(\App::$data, 'db_conn_failed')) {
- $this->install_wizard_pass = 2;
+ self::$install_wizard_pass = 2;
$wizard_status = t('Could not connect to database.');
}
if(x(\App::$data, 'url_fail')) {
- $this->install_wizard_pass = 3;
+ self::$install_wizard_pass = 3;
$wizard_status = t('Could not connect to specified site URL. Possible SSL certificate or DNS issue.');
if(\App::$data['url_error'])
$wizard_status .= ' ' . \App::$data['url_error'];
}
if(x(\App::$data, 'db_create_failed')) {
- $this->install_wizard_pass = 2;
+ self::$install_wizard_pass = 2;
$wizard_status = t('Could not create table.');
}
$db_return_text = '';
@@ -214,9 +215,11 @@ class Setup extends \Zotlabs\Web\Controller {
$tpl = get_markup_template('install.tpl');
return replace_macros($tpl, array(
'$title' => $install_title,
+ '$icon' => null,
'$pass' => '',
'$status' => t('Permission denied.'),
'$text' => '',
+ '$what_next' => null,
));
}
}
@@ -236,7 +239,7 @@ class Setup extends \Zotlabs\Web\Controller {
));
}
- switch ($this->install_wizard_pass){
+ switch (self::$install_wizard_pass){
case 1: { // System check
$checks = array();
@@ -392,7 +395,7 @@ class Setup extends \Zotlabs\Web\Controller {
$this->check_add($checks, t('PHP version'), false, true, $help);
}
- if(strlen($phpath)) {
+ if(!empty($phpath)) {
$passed = file_exists($phpath);
}
elseif(function_exists('shell_exec')) {
@@ -760,11 +763,11 @@ class Setup extends \Zotlabs\Web\Controller {
*/
function what_next() {
// install the standard theme
- set_config('system', 'allowed_themes', 'redbasic');
+ Config::Set('system', 'allowed_themes', 'redbasic');
// if imagick converter is installed, use it
if(@is_executable('/usr/bin/convert')) {
- set_config('system','imagick_convert_path','/usr/bin/convert');
+ Config::Set('system','imagick_convert_path','/usr/bin/convert');
}
@@ -783,7 +786,7 @@ class Setup extends \Zotlabs\Web\Controller {
$x = curl_version();
if(stristr($x['ssl_version'],'openssl'))
- set_config('system','curl_ssl_ciphers','ALL:!eNULL');
+ Config::Set('system','curl_ssl_ciphers','ALL:!eNULL');
// Create a system channel
require_once ('include/channel.php');