summaryrefslogtreecommitdiff
path: root/source3/web/swat.c
diff options
context:
space:
mode:
authorJohn Terpstra <jht@samba.org>2003-07-28 05:47:15 +0000
committerJohn Terpstra <jht@samba.org>2003-07-28 05:47:15 +0000
commit8dea1bb9320c412b40a0bf4446d53e4f74162eda (patch)
treeab9ae92a1278512a2216ed039da37e0b74a479c5 /source3/web/swat.c
parentb4918ea2be3b0295d9c23c503e77b3e69e3f9e76 (diff)
downloadsamba-8dea1bb9320c412b40a0bf4446d53e4f74162eda.tar.gz
samba-8dea1bb9320c412b40a0bf4446d53e4f74162eda.tar.bz2
samba-8dea1bb9320c412b40a0bf4446d53e4f74162eda.zip
Cleanup of loadparm and swat to correctly display all parameters as required.
No change to what is displayed has been made at this time. I do intend to change the display order before 3.0.0 ships. (This used to be commit de7d3063d9e07255da2cc4e67afa50c1e2ddf321)
Diffstat (limited to 'source3/web/swat.c')
-rw-r--r--source3/web/swat.c35
1 files changed, 9 insertions, 26 deletions
diff --git a/source3/web/swat.c b/source3/web/swat.c
index c10890a9bd..a1c132a088 100644
--- a/source3/web/swat.c
+++ b/source3/web/swat.c
@@ -312,9 +312,10 @@ static void show_parameters(int snum, int allparameters, unsigned int parm_filte
if (printers & !(parm->flags & FLAG_PRINT)) continue;
if (!printers & !(parm->flags & FLAG_SHARE)) continue;
}
- if (parm_filter == FLAG_BASIC) {
+
+ if (!( parm_filter & FLAG_ADVANCED )) {
if (!(parm->flags & FLAG_BASIC)) {
- void *ptr = parm->ptr;
+ void *ptr = parm->ptr;
if (parm->class == P_LOCAL && snum >= 0) {
ptr = lp_local_ptr(snum, ptr);
@@ -355,16 +356,15 @@ static void show_parameters(int snum, int allparameters, unsigned int parm_filte
break;
case P_SEP:
continue;
- }
+ }
}
if (printers && !(parm->flags & FLAG_PRINT)) continue;
}
- if (parm_filter == FLAG_WIZARD) {
- if (!((parm->flags & FLAG_WIZARD))) continue;
- }
- if (parm_filter == FLAG_ADVANCED) {
- if (!((parm->flags & FLAG_ADVANCED))) continue;
- }
+
+ if ((parm_filter & FLAG_WIZARD) && !(parm->flags & FLAG_WIZARD)) continue;
+
+ if ((parm_filter & FLAG_ADVANCED) && !(parm->flags & FLAG_ADVANCED)) continue;
+
if (heading && heading != last_heading) {
d_printf("<tr><td></td></tr><tr><td><b><u>%s</u></b></td></tr>\n", _(heading));
last_heading = heading;
@@ -522,11 +522,9 @@ static void ViewModeBoxes(int mode)
d_printf("<p>%s\n", _("Current View Is:&nbsp \n"));
d_printf("<input type=radio name=\"ViewMode\" value=0 %s>Basic\n", (mode == 0) ? "checked" : "");
d_printf("<input type=radio name=\"ViewMode\" value=1 %s>Advanced\n", (mode == 1) ? "checked" : "");
- d_printf("<input type=radio name=\"ViewMode\" value=2 %s>Developer\n", (mode == 2) ? "checked" : "");
d_printf("<br>%s\n", _("Change View To:&nbsp"));
d_printf("<input type=submit name=\"BasicMode\" value=\"%s\">\n", _("Basic"));
d_printf("<input type=submit name=\"AdvMode\" value=\"%s\">\n", _("Advanced"));
- d_printf("<input type=submit name=\"DevMode\" value=\"%s\">\n", _("Developer"));
d_printf("</p><br>\n");
}
@@ -786,8 +784,6 @@ static void globals_page(void)
mode = 0;
if ( cgi_variable("AdvMode"))
mode = 1;
- if ( cgi_variable("DevMode"))
- mode = 2;
d_printf("<form name=\"swatform\" method=post action=globals>\n");
@@ -799,9 +795,6 @@ static void globals_page(void)
case 1:
parm_filter = FLAG_ADVANCED;
break;
- case 2:
- parm_filter = FLAG_DEVELOPER;
- break;
}
d_printf("<br>\n");
if (have_write_access) {
@@ -867,8 +860,6 @@ static void shares_page(void)
mode = 0;
if ( cgi_variable("AdvMode"))
mode = 1;
- if ( cgi_variable("DevMode"))
- mode = 2;
ViewModeBoxes( mode );
switch ( mode ) {
@@ -878,9 +869,6 @@ static void shares_page(void)
case 1:
parm_filter = FLAG_ADVANCED;
break;
- case 2:
- parm_filter = FLAG_DEVELOPER;
- break;
}
d_printf("<br><tr>\n");
d_printf("<td><input type=submit name=selectshare value=\"%s\"></td>\n", _("Choose Share"));
@@ -1214,8 +1202,6 @@ static void printers_page(void)
mode = 0;
if ( cgi_variable("AdvMode"))
mode = 1;
- if ( cgi_variable("DevMode"))
- mode = 2;
ViewModeBoxes( mode );
switch ( mode ) {
@@ -1225,9 +1211,6 @@ static void printers_page(void)
case 1:
parm_filter = FLAG_ADVANCED;
break;
- case 2:
- parm_filter = FLAG_DEVELOPER;
- break;
}
d_printf("<table>\n");
d_printf("<tr><td><input type=submit name=selectshare value=\"%s\"></td>\n", _("Choose Printer"));