update gnupg options implemented
gpg-ezmlm: config update bug fixed
This commit is contained in:
parent
807de1a0d7
commit
3068271d6e
|
@ -205,7 +205,11 @@ elsif ($action eq '' || $action eq 'list_select') {
|
|||
$pagename = '';
|
||||
}
|
||||
if ($pagename ne '') {
|
||||
$success = 'UpdateConfig' if (($action eq 'config_do') && &update_config());
|
||||
if (&is_list_gnupg($q->param('list'))) {
|
||||
$success = 'UpdateConfig' if (($action eq 'config_do') && &update_gnupg());
|
||||
} else {
|
||||
$success = 'UpdateConfig' if (($action eq 'config_do') && &update_config());
|
||||
}
|
||||
} else {
|
||||
$error = 'UnknownConfigPage';
|
||||
warn "missing config page: $subset";
|
||||
|
@ -225,7 +229,7 @@ elsif ($action eq '' || $action eq 'list_select') {
|
|||
$pagename = '';
|
||||
}
|
||||
if ($pagename ne '') {
|
||||
$success = 'UpdateGnupg' if (($action eq 'gnupg_do') && &update_gnupg());
|
||||
$success = 'UpdateGnupg' if (($action eq 'gnupg_do') && &manage_gnupg_keys());
|
||||
} else {
|
||||
$error = 'UnknownGnupgPage';
|
||||
warn "missing gnupg page: $subset";
|
||||
|
@ -1204,20 +1208,46 @@ sub extract_options_from_params()
|
|||
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
sub update_gnupg {
|
||||
sub manage_gnupg_keys()
|
||||
# manage gnupg keys
|
||||
{
|
||||
return (1==0) unless ($GPG_SUPPORT);
|
||||
return (0==0);
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
sub update_gnupg {
|
||||
# save the new gnupg configuration
|
||||
# TODO: add headeradd and so on ...
|
||||
|
||||
my ($list, %switches);
|
||||
return (1==0) unless ($GPG_SUPPORT);
|
||||
|
||||
$list = new Mail::Ezmlm::Gpg("$LIST_DIR/" . $q->param('list'));
|
||||
|
||||
my ($one_switch, $one_value, $key);
|
||||
my @all_params = $q->param;
|
||||
foreach $one_switch (@all_params) {
|
||||
if ($one_switch =~ /^available_option_gnupg_(\w*)$/) {
|
||||
$key = $1;
|
||||
$switches{$key} = (defined($q->param('option_gnupg_' . $key))) ? 1 : 0;
|
||||
}
|
||||
}
|
||||
$list->update(%switches) && return (0==0);
|
||||
return (1==0);
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
sub update_config {
|
||||
# Save the new user entered config ...
|
||||
|
||||
my ($list, $options, @inlocal, @inhost, $dir_of_list);
|
||||
my ($old_msgsize);
|
||||
|
||||
$list = new Mail::Ezmlm("$LIST_DIR/" . $q->param('list'));
|
||||
$dir_of_list = $LIST_DIR . '/' . $q->param('list');
|
||||
$list = new Mail::Ezmlm($dir_of_list);
|
||||
|
||||
$options = &extract_options_from_params();
|
||||
|
||||
|
|
|
@ -210,8 +210,8 @@ Lang {
|
|||
ListLanguage = Sprache der Liste
|
||||
ListCharset = Zeichensatz der Liste
|
||||
ModSubOverridesRemote = Hinweis: falls sowohl die Datenbank der Einsende-ModeratorInnen als auch die der Fern-AdministratorInnen in einem nicht-Standard-Verzeichnis liegen, dann wird die Einsende-ModeratorInnen-Datenbank für beides verwendet
|
||||
NoPublicKeys = Es sind keine öffentlichen Schlüssel vorhanden.
|
||||
NoSecretKeys = Es sind keine privaten Schlüssel vorhanden.
|
||||
GnupgNoPublicKeys = Es sind keine öffentlichen Schlüssel vorhanden.
|
||||
GnupgNoSecretKeys = Es sind keine privaten Schlüssel vorhanden.
|
||||
GnupgImportKey = Schlüssel aus einer Datei importieren:
|
||||
GnupgKeyName = Die Bezeichung des Schlüssels
|
||||
GnupgKeyComment = Ein Kommentar (optional)
|
||||
|
|
|
@ -210,8 +210,8 @@ Lang {
|
|||
ListLanguage = Language of the list
|
||||
ListCharset = Charset of the list
|
||||
ModSubOverridesRemote = Hint: if both the database of subscripton moderators and of remote administrators use customized locations, then the database of subscription moderators will be used for both of them
|
||||
NoPublicKeys = There are no public keys available.
|
||||
NoSecretKeys = There are no secret keys available.
|
||||
GnupgNoPublicKeys = There are no public keys available.
|
||||
GnupgNoSecretKeys = There are no secret keys available.
|
||||
GnupgImportKey = Import a new key from a file:
|
||||
GnupgKeyName = Name of the key
|
||||
GnupgKeyComment = Comment (optional)
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
</form>
|
||||
<?cs else ?>
|
||||
<p><? var:html_escape(Lang.Misc.NoPublicKeys ?></p>
|
||||
<p><?cs var:html_escape(Lang.Misc.GnupgNoPublicKeys) ?></p>
|
||||
<?cs /if ?>
|
||||
|
||||
</fieldset>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
</form>
|
||||
<?cs else ?>
|
||||
<p><? var:html_escape(Lang.Misc.NoSecretKeys ?></p>
|
||||
<p><?cs var:html_escape(Lang.Misc.GnupgNoSecretKeys) ?></p>
|
||||
<?cs /if ?>
|
||||
|
||||
</fieldset>
|
||||
|
|
Loading…
Reference in a new issue