Skip to content

Commit

Permalink
Allow the server description to be set to explicitly nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed Sep 26, 2008
1 parent 75998f0 commit a475f32
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
1 change: 1 addition & 0 deletions samba/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -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.
13 changes: 7 additions & 6 deletions samba/conf_smb.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ printf "$gap <input type=radio name=wins value=2 %s> $text{'config_neither'}\n",
&isfalse("wins support") && &getval("wins server") eq "" ? "checked" : "";
print "</td> </tr>\n";

$desc = &getval("server string");
print "<tr> <td><b>$text{'smb_description'}</b></td>\n";
print "<td colspan=3>\n";
printf "<input type=radio name=server_string_def value=1 %s> $text{'default'}\n",
&getval("server string") eq "" ? "checked" : "";
printf "$gap <input type=radio name=server_string_def value=0 %s>\n",
&getval("server string") eq "" ? "" : "checked";
printf "<input name=server_string size=20 value=\"%s\"></td> </tr>\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 "</td> </tr>\n";

print "<tr> <td><b>$text{'smb_name'}</b></td>\n";
printf "<td><input name=netbios_name size=15 value=\"%s\"></td>\n",
Expand Down
1 change: 1 addition & 0 deletions samba/lang/en
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion samba/save_smb.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -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'}, "");

Expand Down

0 comments on commit a475f32

Please sign in to comment.