mirror of
https://github.com/humhub/humhub.git
synced 2025-01-29 20:38:26 +01:00
fixes
Hide TimeZone setting check from install page
This commit is contained in:
parent
f472d98073
commit
db547b2d99
@ -8,4 +8,4 @@ HumHub Changelog
|
||||
- Fix #4328: Top navigation overlaps post input richtext menu on dashboard page
|
||||
- Fix #4257: Notification dropdown text breaks after notification image on mobile
|
||||
- Chg: Move CHANGELOG to humhub root
|
||||
- Fix #4186:Add Timezone validation rules to admin prerequisite view
|
||||
- Fix #4186: Add Timezone validation rules to admin prerequisite view
|
||||
|
@ -411,17 +411,19 @@ class SelfTest
|
||||
}
|
||||
|
||||
// Timezone Setting
|
||||
$title = 'Timezone Setting';
|
||||
if (TimezoneHelper::compareTimeZones()) {
|
||||
$checks[] = [
|
||||
'title' => Yii::t('base', $title),
|
||||
'state' => 'OK'
|
||||
];
|
||||
} else {
|
||||
$checks[] = [
|
||||
'title' => Yii::t('base', $title),
|
||||
'state' => 'WARNING',
|
||||
];
|
||||
if (Yii::$app->controller->id != 'setup') {
|
||||
$title = 'Timezone Setting';
|
||||
if (TimezoneHelper::compareTimeZones()) {
|
||||
$checks[] = [
|
||||
'title' => Yii::t('base', $title),
|
||||
'state' => 'OK'
|
||||
];
|
||||
} else {
|
||||
$checks[] = [
|
||||
'title' => Yii::t('base', $title),
|
||||
'state' => 'WARNING',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
// Check Runtime Directory
|
||||
|
@ -94,7 +94,7 @@ class TimezoneHelper
|
||||
}
|
||||
|
||||
/**
|
||||
* compare db and MySql Timezones
|
||||
* Compares configured time zone with reported database connection time zone
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
@ -107,8 +107,8 @@ class TimezoneHelper
|
||||
}
|
||||
$dbTimeZone = new DateTimeZone($timeZone);
|
||||
$dbTimeZoneOffset = $dbTimeZone->getOffset(new DateTime);
|
||||
$offset_prefix = $dbTimeZoneOffset < 0 ? '-' : '+';
|
||||
return self::getMysqlTimeZone() == $offset_prefix.gmdate('H:i', abs($dbTimeZoneOffset));
|
||||
$offsetPrefix = $dbTimeZoneOffset < 0 ? '-' : '+';
|
||||
return self::getMysqlTimeZone() == $offsetPrefix.gmdate('H:i', abs($dbTimeZoneOffset));
|
||||
} catch (Exception $e) {
|
||||
return false;
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ class BasicSettingsForm extends \yii\base\Model
|
||||
public function attributeHints()
|
||||
{
|
||||
return [
|
||||
'timeZone' => Yii::t('AdminModule.settings', 'Database Timezone: UTC{timeZone}', ['timeZone' => TimezoneHelper::getMysqlTimeZone()]),
|
||||
'timeZone' => Yii::t('AdminModule.settings', 'Reported database time zone: UTC{timeZone}', ['timeZone' => TimezoneHelper::getMysqlTimeZone()]),
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user