From a81e153b3e84f4dcb107b4169e5780cf8621481a Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Mon, 20 Jul 2009 12:33:01 +0200 Subject: [PATCH] Use pgp form field only if gnupg is installed and configured. --- turba/config/attributes.php.dist | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/turba/config/attributes.php.dist b/turba/config/attributes.php.dist index c61b8d01d..931a4ae4b 100644 --- a/turba/config/attributes.php.dist +++ b/turba/config/attributes.php.dist @@ -335,12 +335,21 @@ $attributes['freebusyUrl'] = array( 'required' => false, 'params' => array('regex' => '', 'size' => 40, 'maxlength' => 255) ); -$attributes['pgpPublicKey'] = array( - 'label' => _("PGP Public Key"), - 'type' => 'pgp', - 'required' => false, - 'params' => array('gpg' => $GLOBALS['conf']['gnupg']['path'], 'temp_dir' => Horde::getTempDir(), 'rows' => 3, 'cols' => 40) -); +if (!empty($GLOBALS['conf']['gnupg']['path'])) { + $attributes['pgpPublicKey'] = array( + 'label' => _("PGP Public Key"), + 'type' => 'pgp', + 'required' => false, + 'params' => array('gpg' => $GLOBALS['conf']['gnupg']['path'], 'temp_dir' => Horde::getTempDir(), 'rows' => 3, 'cols' => 40) + ); +} else { + $attributes['pgpPublicKey'] = array( + 'label' => _("PGP Public Key"), + 'type' => 'longtext', + 'required' => false, + 'params' => array('rows' => 3, 'cols' => 40) + ); +} $attributes['smimePublicKey'] = array( 'label' => _("S/MIME Public Certificate"), 'type' => 'smime', -- 2.11.0