Contacts: Better checks for GD library.
This commit is contained in:
parent
76b8d06284
commit
2c264f836c
|
@ -26,6 +26,11 @@ if(is_null($id)) {
|
||||||
getStandardImage();
|
getStandardImage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!extension_loaded('gd') || !function_exists('gd_info')) {
|
||||||
|
OCP\Util::writeLog('contacts','photo.php. GD module not installed',OCP\Util::DEBUG);
|
||||||
|
getStandardImage();
|
||||||
|
}
|
||||||
|
|
||||||
$contact = OC_Contacts_App::getContactVCard($id);
|
$contact = OC_Contacts_App::getContactVCard($id);
|
||||||
$image = new OC_Image();
|
$image = new OC_Image();
|
||||||
if(!$image) {
|
if(!$image) {
|
||||||
|
|
|
@ -32,7 +32,7 @@ function getStandardImage(){
|
||||||
OCP\Response::redirect(OCP\Util::imagePath('contacts', 'person.png'));
|
OCP\Response::redirect(OCP\Util::imagePath('contacts', 'person.png'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!function_exists('imagecreatefromjpeg')) {
|
if(!extension_loaded('gd') || !function_exists('gd_info')) {
|
||||||
OCP\Util::writeLog('contacts','thumbnail.php. GD module not installed',OCP\Util::DEBUG);
|
OCP\Util::writeLog('contacts','thumbnail.php. GD module not installed',OCP\Util::DEBUG);
|
||||||
getStandardImage();
|
getStandardImage();
|
||||||
exit();
|
exit();
|
||||||
|
|
Loading…
Reference in New Issue