Revision c260666f
Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt
SL/Drafts.pm | ||
---|---|---|
34 | 34 |
return ($module, $submodule); |
35 | 35 |
} |
36 | 36 |
|
37 |
@dont_save = qw(login password stylesheet action); |
|
38 |
|
|
37 | 39 |
sub save { |
38 | 40 |
$main::lxdebug->enter_sub(); |
39 | 41 |
|
40 | 42 |
my ($self, $myconfig, $form, $draft_id, $draft_description) = @_; |
41 | 43 |
|
42 |
my ($dbh, $sth, $query, %saved, @dont_save, $dumped);
|
|
44 |
my ($dbh, $sth, $query, %saved, $dumped); |
|
43 | 45 |
|
44 | 46 |
$dbh = $form->dbconnect_noauto($myconfig); |
45 | 47 |
|
... | ... | |
54 | 56 |
do_query($form, $dbh, $query, $draft_id, $module, $submodule); |
55 | 57 |
} |
56 | 58 |
|
57 |
@dont_save = qw(login password action); |
|
58 | 59 |
map({ $saved{$_} = $form->{$_}; |
59 | 60 |
delete($form->{$_}); } @dont_save); |
60 | 61 |
|
bin/mozilla/drafts.pl | ||
---|---|---|
103 | 103 |
if ($old_form) { |
104 | 104 |
$old_form = YAML::Load($old_form); |
105 | 105 |
|
106 |
@{$form}{keys %{ $old_form } } = @{$old_form}{keys %{ $old_form } }; |
|
106 |
my %dont_save_vars = map { $_ => 1 } @Drafts::dont_save; |
|
107 |
my @restore_vars = grep { !$skip_vars{$_} } keys %{ $old_form }; |
|
108 |
|
|
109 |
@{$form}{@restore_vars} = @{$old_form}{@restore_vars}; |
|
107 | 110 |
|
108 | 111 |
$form->{draft_id} = $id; |
109 | 112 |
$form->{draft_description} = $description; |
Auch abrufbar als: Unified diff
Bei den Entwürfen nicht die Variable "stylesheet" speichern.