Fixes border case when timezone is empty but not null
parent
aa530c20d2
commit
b4fabb6d59
|
@ -47,7 +47,7 @@
|
|||
<label class="form-label"><small>timezone:</small></label>
|
||||
</div>
|
||||
<div class="col-md-8 text-start bg-light">
|
||||
<?php if (isset($userDetails[0]['timezone'])) { ?>
|
||||
<?php if (!empty($userDetails[0]['timezone'])) { ?>
|
||||
<?= htmlspecialchars($userDetails[0]['timezone']) ?> <span style="font-size: 0.66em;">(<?= htmlspecialchars(getUTCOffset($userDetails[0]['timezone'])) ?>)</span>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
* Version: 0.3
|
||||
*/
|
||||
|
||||
// we start output buffering and.
|
||||
// we start output buffering and
|
||||
// flush it later only when there is no redirect
|
||||
ob_start();
|
||||
|
||||
|
@ -195,8 +195,7 @@ if ($page == 'logout') {
|
|||
$user_id = $userObject->getUserId($currentUser)[0]['id'];
|
||||
$userDetails = $userObject->getUserDetails($user_id);
|
||||
$userRights = $userObject->getUserRights($user_id);
|
||||
$userTimezone = isset($userDetails[0]['timezone']) ? $userDetails[0]['timezone'] : 'UTC'; // Default to UTC if no timezone is set
|
||||
|
||||
$userTimezone = (!empty($userDetails[0]['timezone'])) ? $userDetails[0]['timezone'] : 'UTC'; // Default to UTC if no timezone is set (or is missing)
|
||||
|
||||
// check if the Jilo Server is running
|
||||
require '../app/classes/server.php';
|
||||
|
|
Loading…
Reference in New Issue