From 0dc959d9fe40bddce5e99b8162bb0e770fc28ed9 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 24 Mar 2024 09:58:21 +0000 Subject: Deprecate *_config() functions in core. --- Zotlabs/Module/Setup.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Module/Setup.php') diff --git a/Zotlabs/Module/Setup.php b/Zotlabs/Module/Setup.php index 83faf85dc..74b10de25 100644 --- a/Zotlabs/Module/Setup.php +++ b/Zotlabs/Module/Setup.php @@ -8,6 +8,7 @@ namespace Zotlabs\Module; * @todo This setup module could need some love and improvements. */ +use Zotlabs\Lib\Config; /** * @brief Initialisation for the setup module. @@ -760,11 +761,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 +784,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'); -- cgit v1.2.3 From 26c1fa07c912547f7d55c19f34aad0912e5f3f29 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Thu, 18 Apr 2024 09:55:42 +0000 Subject: Reduce some global state and add some docs --- Zotlabs/Module/Setup.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Module/Setup.php') diff --git a/Zotlabs/Module/Setup.php b/Zotlabs/Module/Setup.php index 74b10de25..65d4ec471 100644 --- a/Zotlabs/Module/Setup.php +++ b/Zotlabs/Module/Setup.php @@ -1,5 +1,4 @@ Date: Mon, 27 May 2024 06:17:05 +0000 Subject: Upgrade test framework to PHPUnit 10.5 --- Zotlabs/Module/Setup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Module/Setup.php') diff --git a/Zotlabs/Module/Setup.php b/Zotlabs/Module/Setup.php index 65d4ec471..647415385 100644 --- a/Zotlabs/Module/Setup.php +++ b/Zotlabs/Module/Setup.php @@ -393,7 +393,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')) { -- cgit v1.2.3 From 13c074f8b8f8340efc7c5912c615b6cfa693409d Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Wed, 22 May 2024 19:20:57 +0200 Subject: Module\Setup: Pass all required params for the template. Non-existing keys in the array passed to the template causes a warning. Also make optional parts of the template actually optional by skipping them if the value is empty. --- Zotlabs/Module/Setup.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Zotlabs/Module/Setup.php') diff --git a/Zotlabs/Module/Setup.php b/Zotlabs/Module/Setup.php index 647415385..a4204afd7 100644 --- a/Zotlabs/Module/Setup.php +++ b/Zotlabs/Module/Setup.php @@ -215,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, )); } } -- cgit v1.2.3 From ac1e20b1880d57aab2048e670449768d51dbc0b0 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Wed, 22 May 2024 20:44:27 +0200 Subject: Module\Setup: Don't access static variable as non static. --- Zotlabs/Module/Setup.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Module/Setup.php') diff --git a/Zotlabs/Module/Setup.php b/Zotlabs/Module/Setup.php index a4204afd7..7ca3f827c 100644 --- a/Zotlabs/Module/Setup.php +++ b/Zotlabs/Module/Setup.php @@ -46,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; } } @@ -239,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(); -- cgit v1.2.3 From 30ba0661aa591b860ee4d7e38cee0a8ad4c3ea44 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 27 Jun 2024 20:01:52 +0000 Subject: fix php error --- Zotlabs/Module/Setup.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Zotlabs/Module/Setup.php') diff --git a/Zotlabs/Module/Setup.php b/Zotlabs/Module/Setup.php index 7ca3f827c..35079e5e5 100644 --- a/Zotlabs/Module/Setup.php +++ b/Zotlabs/Module/Setup.php @@ -58,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; @@ -180,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 = ''; -- cgit v1.2.3