Contacts: Better checks for GD library.

This commit is contained in:
Thomas Tanghus 2012-05-04 23:53:29 +02:00
parent 76b8d06284
commit 2c264f836c
2 changed files with 6 additions and 1 deletions

View File

@ -26,6 +26,11 @@ if(is_null($id)) {
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);
$image = new OC_Image();
if(!$image) {

View File

@ -32,7 +32,7 @@ function getStandardImage(){
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);
getStandardImage();
exit();