Revision b2f44e3d
Von Moritz Bunkus vor mehr als 15 Jahren hinzugefügt
bin/mozilla/amcvar.pl | ||
---|---|---|
73 | 73 |
|
74 | 74 |
my $previous_config; |
75 | 75 |
|
76 |
foreach (@configs) { |
|
77 |
$_->{type_tr} = $translations{$_->{type}}; |
|
76 |
foreach my $config (@configs) { |
|
77 |
$config->{type_tr} = $translations{$config->{type}}; |
|
78 |
|
|
79 |
foreach my $flag (split m/:/, $config->{flags}) { |
|
80 |
if ($flag =~ m/(.*?)=(.*)/) { |
|
81 |
$config->{"flag_${1}"} = $2; |
|
82 |
} else { |
|
83 |
$config->{"flag_${flag}"} = 1; |
|
84 |
} |
|
85 |
} |
|
78 | 86 |
|
79 | 87 |
if ($previous_config) { |
80 |
$previous_config->{next_id} = $_->{id};
|
|
81 |
$_->{previous_id} = $previous_config->{id};
|
|
88 |
$previous_config->{next_id} = $config->{id};
|
|
89 |
$config->{previous_id} = $previous_config->{id};
|
|
82 | 90 |
} |
83 | 91 |
|
84 |
$previous_config = $_;
|
|
92 |
$previous_config = $config;
|
|
85 | 93 |
} |
86 | 94 |
|
87 | 95 |
$form->{title} = $locale->text('List of custom variables'); |
... | ... | |
138 | 146 |
|
139 | 147 |
$form->{included_by_default} = $form->{inclusion} eq 'yes_default_on'; |
140 | 148 |
$form->{includeable} = $form->{inclusion} ne 'no'; |
149 |
$form->{flags} = join ':', map { m/^flag_(.*)/; "${1}=" . $form->{$_} } grep { m/^flag_/ } keys %{ $form }; |
|
141 | 150 |
|
142 | 151 |
CVar->save_config('module' => $form->{module}, |
143 | 152 |
'config' => $form); |
Auch abrufbar als: Unified diff
Das Definieren, Erstellen und Bearbeiten von benutzerdefinierten Variablen bei Waren, Dienstleistungen und Erzeugnissen implementiert.