From e7218b2904de8828fa4e299a786f56916eebeb96 Mon Sep 17 00:00:00 2001 From: Steve Ireland Date: Thu, 27 Apr 2023 21:45:13 -0400 Subject: [PATCH] For #3741. Manual migration of commits from master to branch through April 22, 2023. --- INSTALL.md | 2 +- app/Controllers/Secure_Controller.php | 2 +- app/Models/Employee.php | 2 +- app/Views/configs/system_info.php | 6 +++--- app/Views/employees/form.php | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 3a869fbeb..931550152 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,6 +1,6 @@ ## Server Requirements -- PHP version `7.2` to `7.4` are supported, PHP version `≤5.6` and `8.0` are NOT supported. Please note that PHP needs to have the extensions `php-gd`, `php-bcmath`, `php-intl`, `php-openssl`, `php-mbstring` and `php-curl` installed and enabled. +- PHP version `7.2` to `7.4` are supported, PHP version `≤5.6` and `8.0` are NOT supported. Please note that PHP needs to have the extensions `php-gd`, `php-bcmath`, `php-intl`, `php-openssl`, `php-mbstring` , `php-curl` and `php-xml` installed and enabled. - MySQL `5.5`, `5.6` and `5.7` are supported, also MariaDB replacement `10.x` is supported and might offer better performance. - Apache `2.2` and `2.4` are supported. Nginx should work fine too, see [wiki page here](https://github.com/opensourcepos/opensourcepos/wiki/Local-Deployment-using-LEMP). - Raspberry PI based installations proved to work, see [wiki page here](). diff --git a/app/Controllers/Secure_Controller.php b/app/Controllers/Secure_Controller.php index a50affabe..808464c41 100644 --- a/app/Controllers/Secure_Controller.php +++ b/app/Controllers/Secure_Controller.php @@ -30,7 +30,7 @@ class Secure_Controller extends BaseController if(!$this->employee->is_logged_in()) { - return redirect()->to('login'); + header("Location:".base_url('login')); } $logged_in_employee_info = $this->employee->get_logged_in_employee_info(); diff --git a/app/Models/Employee.php b/app/Models/Employee.php index ab95ed6e2..40ddb000f 100644 --- a/app/Models/Employee.php +++ b/app/Models/Employee.php @@ -493,7 +493,7 @@ class Employee extends Person /** * Returns the menu group designation that this module is to appear in */ - public function get_menu_group(string $permission_id, int $person_id): string + public function get_menu_group(string $permission_id, ?int $person_id): string { $builder = $this->db->table('grants'); $builder->select('menu_group'); diff --git a/app/Views/configs/system_info.php b/app/Views/configs/system_info.php index 7d7e1be3e..fbc56665c 100644 --- a/app/Views/configs/system_info.php +++ b/app/Views/configs/system_info.php @@ -13,7 +13,7 @@

General Info

-

User Setup

+

User Setup


Permissions


@@ -25,11 +25,11 @@ Enabled ✓' : 'Disabled ✗', '
'; echo "» BC Math: ", extension_loaded('bcmath') ? 'Enabled ✓' : 'Disabled ✗', '
'; - echo "» XML: ", extension_loaded('xml') ? 'Enabled ✓' : 'Disabled ✗', '
'; echo "» INTL: ", extension_loaded('intl') ? 'Enabled ✓' : 'Disabled ✗', '
'; echo "» OpenSSL: ", extension_loaded('openssl') ? 'Enabled ✓' : 'Disabled ✗', '
'; echo "» MBString: ", extension_loaded('mbstring') ? 'Enabled ✓' : 'Disabled ✗', '
'; - echo "» Curl: ", extension_loaded('curl') ? 'Enabled ✓' : 'Disabled ✗', '

'; + echo "» Curl: ", extension_loaded('curl') ? 'Enabled ✓' : 'Disabled ✗', '
'; + echo "» Xml: ", extension_loaded('xml') ? 'Enabled ✓' : 'Disabled ✗', '

'; ?> User Configuration:
.Browser: diff --git a/app/Views/employees/form.php b/app/Views/employees/form.php index e30b6c4ee..a082e6181 100644 --- a/app/Views/employees/form.php +++ b/app/Views/employees/form.php @@ -139,7 +139,7 @@ { $lang_key = $module->module_id . '_' . $exploded_permission[1]; $lang_line = lang($lang_key); - $lang_line = ($this->lang->line_tbd($lang_key) == $lang_line) ? ucwords(str_replace("_", " ",$exploded_permission[1])) : $lang_line; + $lang_line = (lang($lang_key) == $lang_line) ? ucwords(str_replace("_", " ",$exploded_permission[1])) : $lang_line; if(!empty($lang_line)) { ?>