Add warning regarding freetype support

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2017-12-13 12:36:48 +01:00 committed by Daniel Calviño Sánchez
parent 2943b54f98
commit 7618473a44
2 changed files with 18 additions and 0 deletions

View File

@ -174,6 +174,15 @@
type: OC.SetupChecks.MESSAGE_TYPE_WARNING type: OC.SetupChecks.MESSAGE_TYPE_WARNING
}); });
} }
if (!data.hasFreeTypeSupport) {
messages.push({
msg: t(
'core',
'Your PHP does not have freetype support. This will result in broken profile pictures and settings interface.'
),
type: OC.SetupChecks.MESSAGE_TYPE_INFO
})
}
} else { } else {
messages.push({ messages.push({
msg: t('core', 'Error occurred while checking server setup'), msg: t('core', 'Error occurred while checking server setup'),

View File

@ -409,6 +409,14 @@ Raw output
return $isOpcacheProperlySetUp; return $isOpcacheProperlySetUp;
} }
/**
* Check if the required FreeType functions are present
* @return bool
*/
protected function hasFreeTypeSupport() {
return function_exists('imagettfbbox') && function_exists('imagettftext');
}
/** /**
* @return DataResponse * @return DataResponse
*/ */
@ -430,6 +438,7 @@ Raw output
'isOpcacheProperlySetup' => $this->isOpcacheProperlySetup(), 'isOpcacheProperlySetup' => $this->isOpcacheProperlySetup(),
'phpOpcacheDocumentation' => $this->urlGenerator->linkToDocs('admin-php-opcache'), 'phpOpcacheDocumentation' => $this->urlGenerator->linkToDocs('admin-php-opcache'),
'isSettimelimitAvailable' => $this->isSettimelimitAvailable(), 'isSettimelimitAvailable' => $this->isSettimelimitAvailable(),
'hasFreeTypeSupport' => $this->hasFreeTypeSupport(),
] ]
); );
} }