Fix editing of 'other' category name http://virtualmin.com/node/34341

This commit is contained in:
Jamie Cameron
2014-09-27 09:33:17 -07:00
parent 333343af46
commit 3ac3be1878
2 changed files with 6 additions and 4 deletions

View File

@ -28,9 +28,10 @@ $file .= ".".$in{'lang'} if ($in{'lang'});
read_file($file, \%catnames);
foreach $t (keys %text) {
$t =~ s/^category_// || next;
$field = $t || "other";
print &ui_columns_row([
$t || "<i>other</i>",
&ui_opt_textbox($t, $catnames{$t}, 30,
&ui_opt_textbox($field, $catnames{$t}, 30,
$text{'default'}, $text{'categories_custom'}),
], [ "valign=middle","valign=middle" ]);
$realcat{$t}++;

View File

@ -8,9 +8,10 @@ require './webmin-lib.pl';
# Save built-in categories
foreach $t (keys %text) {
$t =~ s/^category_// || next;
if (!$in{$t."_def"}) {
$in{$t} || &error(&text('categories_edesc', $t ? $t : 'other'));
$catnames{$t} = $in{$t};
$field = $t || "other";
if (!$in{$field."_def"}) {
$in{$field} || &error(&text('categories_edesc', $t || 'other'));
$catnames{$t} = $in{$field};
}
}