Skip to content

Commit

Permalink
System: v23.0.01 post-release fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
SKuipers committed Feb 16, 2022
1 parent bd37783 commit 2c64c36
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ v23.0.01
System Admin: improved login logs to include login method and user id

Bug Fixes
System: fixed user's personal language and theme not set after login
System: fixed string replacements with {} placeholders not working
System Admin: fixed HTML being stripped out of the privacy policy
System Admin: fixed invalid password field in user imports in Import From File
System Admin: fixed custom field headings not working for non-english locales
System Admin: fixed blank User column for logins listed in View Logs
Expand Down
2 changes: 1 addition & 1 deletion modules/System Admin/privacySettingsProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

require_once '../../gibbon.php';

$_POST = $container->get(Validator::class)->sanitize($_POST, ['cookieConsentText' => 'HTML']);
$_POST = $container->get(Validator::class)->sanitize($_POST, ['cookieConsentText' => 'HTML', 'privacyPolicy' => 'HTML']);

// Module includes
include './moduleFunctions.php';
Expand Down
7 changes: 5 additions & 2 deletions src/Auth/Adapter/AuthenticationAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,11 @@ protected function updateUserData($userData)
);
}

// Update user language
$languageSelected = $_POST['gibboni18nID'] ?? $this->session->get('gibboni18nIDPersonal') ?? null;
// Update user language, using login option, then personal language, then system default
$languageSelected = !empty($_POST['gibboni18nID'] && $_POST['gibboni18nID'] != $this->session->get('i18n')['gibboni18nID'])
? $_POST['gibboni18nID'] :
$userData['gibboni18nIDPersonal'] ?? null;

if (!empty($languageSelected)) {
if ($i18n = $this->getContainer()->get(I18nGateway::class)->getByID($languageSelected)) {
$this->session->set('i18n', $i18n);
Expand Down
4 changes: 3 additions & 1 deletion src/Domain/User/UserGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ public function selectLoginDetailsByUsername($username)
gibbonRole.futureYearsLogin,
gibbonRole.pastYearsLogin,
gibbonRole.name as roleName,
gibbonRole.category as roleCategory
gibbonRole.category as roleCategory,
gibbonPerson.gibboni18nIDPersonal,
gibbonPerson.gibbonThemeIDPersonal
FROM gibbonPerson
LEFT JOIN gibbonRole ON (gibbonPerson.gibbonRoleIDPrimary=gibbonRole.gibbonRoleID)
WHERE (
Expand Down

0 comments on commit 2c64c36

Please sign in to comment.