Hide QR-Code button if PHP-GD is not installed

Keep it as an optional dependency.
This commit is contained in:
Aleksander Machniak
2017-01-04 13:03:27 +01:00
parent f78e2a4367
commit 9d6aa00a44
3 changed files with 7 additions and 0 deletions

View File

@@ -42,7 +42,10 @@ if ($cid && ($record = ($CONTACT_RECORD ?: $CONTACTS->get_record($cid, true))))
// get address book name (for display)
rcmail_set_sourcename($CONTACTS);
// Disable qr-code if php-gd is not installed
$OUTPUT->set_env('qrcode', function_exists('imagecreate'));
$OUTPUT->add_label('qrcode');
$OUTPUT->add_handlers(array(
'contacthead' => 'rcmail_contact_head',
'contactdetails' => 'rcmail_contact_details',