summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-05-04 23:53:29 +0200
committerThomas Tanghus <thomas@tanghus.net>2012-05-04 23:53:29 +0200
commit2c264f836c382f3c3555918484c749d0633a8308 (patch)
treea8c56231510705d8449b77b9ca976c1b2ab0773d
parent76b8d062846a2bfb84d0db7164ea0d8e44f3dad0 (diff)
downloadnextcloud-server-2c264f836c382f3c3555918484c749d0633a8308.tar.gz
nextcloud-server-2c264f836c382f3c3555918484c749d0633a8308.zip
Contacts: Better checks for GD library.
-rwxr-xr-xapps/contacts/photo.php5
-rwxr-xr-xapps/contacts/thumbnail.php2
2 files changed, 6 insertions, 1 deletions
diff --git a/apps/contacts/photo.php b/apps/contacts/photo.php
index 6fe68cefb6d..729c2dfbcfd 100755
--- a/apps/contacts/photo.php
+++ b/apps/contacts/photo.php
@@ -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) {
diff --git a/apps/contacts/thumbnail.php b/apps/contacts/thumbnail.php
index 11d1db03108..5b340042a25 100755
--- a/apps/contacts/thumbnail.php
+++ b/apps/contacts/thumbnail.php
@@ -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();