From 0151736c60b6ad2f090c9a901fc7b2576b719f0a Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Fri, 1 Nov 2013 14:22:13 +0000 Subject: [PATCH] auto-convert photos to JPG (158) --- lam/lib/modules/inetOrgPerson.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lam/lib/modules/inetOrgPerson.inc b/lam/lib/modules/inetOrgPerson.inc index 3111850a..2f539bfc 100644 --- a/lam/lib/modules/inetOrgPerson.inc +++ b/lam/lib/modules/inetOrgPerson.inc @@ -2163,7 +2163,11 @@ class inetOrgPerson extends baseModule implements passwordService { */ function display_html_photo() { $container = new htmlTable(); - $container->addElement(new htmlTableExtendedInputFileUpload('photoFile', _('Photo file (JPG format)'), 'photoUpload'), true); + $label = _('Photo file (JPG format)'); + if (extension_loaded('imagick')) { + $label = _('Photo file'); + } + $container->addElement(new htmlTableExtendedInputFileUpload('photoFile', $label, 'photoUpload'), true); $buttonContainer = new htmlTable(); $buttonContainer->addElement(new htmlAccountPageButton(get_class($this), 'attributes', 'submit', _('Add photo'))); $buttonContainer->addElement(new htmlAccountPageButton(get_class($this), 'attributes', 'back', _('Back')));