function _printKeyInfo($key = '')
{
$key_info = $GLOBALS['imp_pgp']->pgpPrettyKey($key);
-
- if (empty($key_info)) {
- _textWindowOutput('PGP Key Information', _("Invalid key"));
- } else {
- _textWindowOutput('PGP Key Information', $key_info);
- }
+ _textWindowOutput('PGP Key Information', empty($key_info) ? _("Invalid key") : $key_info);
}
function _outputPassphraseDialog($secure_check, $symmetric = false)
echo $t->fetch(IMP_TEMPLATES . '/pgp/import_key.html');
}
-function _reloadWindow()
-{
- Util::closeWindowJS('opener.focus();opener.location.href="' . Util::getFormData('reload') . '";');
-}
-
function _getImportKey()
{
$key = Util::getFormData('import_key');
foreach ($key_info['signature'] as $sig) {
$notification->push(sprintf(_("PGP Public Key for \"%s (%s)\" was successfully added."), $sig['name'], $sig['email']), 'horde.success');
}
- _reloadWindow();
+ Util::closeWindowJS('opener.focus();opener.location.href="' . Util::getFormData('reload') . '";');
}
}
exit;
* successfully - close the import popup window. */
$imp_pgp->addPersonalPrivateKey($privateKey);
$notification->push(_("PGP private key successfully added."), 'horde.success');
- _reloadWindow();
+ Util::closeWindowJS('opener.focus();opener.location.href="' . Util::getFormData('reload') . '";');
} else {
/* Invalid private key imported - Redo private key import
* screen. */
$cacheSess->setPruneFlag($oid, true);
Util::closeWindowJS($cacheSess->query($oid));
} elseif (Util::getFormData('reload')) {
- _reloadWindow();
+ Util::closeWindowJS('opener.focus();opener.location.href="' . Util::getFormData('reload') . '";');
} else {
Util::closeWindowJS();
}