diff --git a/samba/CHANGELOG b/samba/CHANGELOG index b979b4a297..543c876285 100644 --- a/samba/CHANGELOG +++ b/samba/CHANGELOG @@ -20,3 +20,4 @@ Added checkboxes and a button for deleting multiple shares at once. Added fields to set the permissions and group ownership of new shared directories. ---- Changes since 1.430 ---- The 'Password never expires' flag can be set for user accounts, thanks to a patch from Juan Miguel Corral. +Allow the server description to be set to explicitly nothing. diff --git a/samba/conf_smb.cgi b/samba/conf_smb.cgi index abca3b1476..6d550ae45d 100755 --- a/samba/conf_smb.cgi +++ b/samba/conf_smb.cgi @@ -40,14 +40,15 @@ printf "$gap $text{'config_neither'}\n", &isfalse("wins support") && &getval("wins server") eq "" ? "checked" : ""; print " \n"; +$desc = &getval("server string"); print " $text{'smb_description'}\n"; print "\n"; -printf " $text{'default'}\n", - &getval("server string") eq "" ? "checked" : ""; -printf "$gap \n", - &getval("server string") eq "" ? "" : "checked"; -printf " \n", - &getval("server string"); +print &ui_radio("server_string_def", !defined($desc) ? 1 : + $desc eq "" ? 2 : 0, + [ [ 1, $text{'default'} ], + [ 2, $text{'smb_descriptionnone'} ], + [ 0, &ui_textbox("server_string", $desc, 40) ] ]); +print " \n"; print " $text{'smb_name'}\n"; printf "\n", diff --git a/samba/lang/en b/samba/lang/en index 07f9157756..dcfe4d0b80 100644 --- a/samba/lang/en +++ b/samba/lang/en @@ -142,6 +142,7 @@ smb_wins=WINS mode smb_winsserver=Be WINS server smb_useserver=Use server smb_description=Server description +smb_descriptionnone=None smb_name=Server name smb_aliase=Server aliases smb_default=Default service diff --git a/samba/save_smb.cgi b/samba/save_smb.cgi index 3b7343d2b9..50ef1de697 100755 --- a/samba/save_smb.cgi +++ b/samba/save_smb.cgi @@ -28,7 +28,13 @@ else { &setval("wins support", "false"); } -&setval("server string", $in{server_string_def} ? "" : $in{server_string}, ""); +if ($in{server_string_def} == 1) { + &delval("server string"); + } +else { + &setval("server string", + $in{server_string_def} == 2 ? "" : $in{server_string}, "NONE"); + } &setval("netbios name", $in{'netbios_name'}, "");