cb55925
diff -up cups-1.4.2/cgi-bin/admin.c.str3418 cups-1.4.2/cgi-bin/admin.c
cb55925
--- cups-1.4.2/cgi-bin/admin.c.str3418	2009-11-17 13:23:51.130084685 +0000
cb55925
+++ cups-1.4.2/cgi-bin/admin.c	2009-11-17 13:23:56.773209143 +0000
cb55925
@@ -1261,7 +1261,7 @@ do_am_printer(http_t *http,		/* I - HTTP
cb55925
       * Got the list of PPDs, see if the user has selected a make...
cb55925
       */
cb55925
 
cb55925
-      if (cgiSetIPPVars(response, NULL, NULL, NULL, 0) == 0)
cb55925
+      if (cgiSetIPPVars(response, NULL, NULL, NULL, 0) == 0 && !modify)
cb55925
       {
cb55925
        /*
cb55925
         * No PPD files with this make, try again with all makes...
cb55925
@@ -1297,8 +1297,11 @@ do_am_printer(http_t *http,		/* I - HTTP
cb55925
 	*/
cb55925
 
cb55925
         cgiStartHTML(title);
cb55925
-	cgiSetVariable("CURRENT_MAKE_AND_MODEL",
cb55925
-	               cgiGetArray("PPD_MAKE_AND_MODEL", 0));
cb55925
+	if (!cgiGetVariable("PPD_MAKE"))
cb55925
+	  cgiSetVariable("PPD_MAKE", cgiGetVariable("CURRENT_MAKE"));
cb55925
+	if (!modify)
cb55925
+	  cgiSetVariable("CURRENT_MAKE_AND_MODEL",
cb55925
+	                 cgiGetArray("PPD_MAKE_AND_MODEL", 0));
cb55925
 	cgiCopyTemplateLang("choose-model.tmpl");
cb55925
         cgiEndHTML();
cb55925
       }
cb55925
@@ -1590,7 +1593,7 @@ do_config_server(http_t *http)		/* I - H
cb55925
 #ifdef HAVE_GSSAPI
cb55925
     char		default_auth_type[255];
cb55925
 					/* DefaultAuthType value */
cb55925
-    const char		*val;		/* Setting value */ 
cb55925
+    const char		*val;		/* Setting value */
cb55925
 #endif /* HAVE_GSSAPI */
cb55925
 
cb55925
 
cb55925
@@ -1662,7 +1665,7 @@ do_config_server(http_t *http)		/* I - H
cb55925
 	  strcat(local_protocols, "slp");
cb55925
       }
cb55925
 #endif /* HAVE_SLP */
cb55925
-      
cb55925
+
cb55925
       if (cgiGetVariable("BROWSE_REMOTE_CUPS"))
cb55925
 	strcpy(remote_protocols, "cups");
cb55925
       else
cb55925
@@ -1915,7 +1918,7 @@ do_config_server(http_t *http)		/* I - H
cb55925
       cgiSetVariable("ERROR", strerror(errno));
cb55925
       cgiCopyTemplateLang("error.tmpl");
cb55925
       cgiEndHTML();
cb55925
-      
cb55925
+
cb55925
       perror(tempfile);
cb55925
       return;
cb55925
     }
cb55925
@@ -1927,7 +1930,7 @@ do_config_server(http_t *http)		/* I - H
cb55925
       cgiSetVariable("ERROR", strerror(errno));
cb55925
       cgiCopyTemplateLang("error.tmpl");
cb55925
       cgiEndHTML();
cb55925
-      
cb55925
+
cb55925
       perror(tempfile);
cb55925
       close(tempfd);
cb55925
       unlink(tempfile);
cb55925
@@ -3342,7 +3345,7 @@ do_set_options(http_t *http,		/* I - HTT
cb55925
           ((ppdattr = ppdFindAttr(ppd, "cupsCommands", NULL)) != NULL &&
cb55925
            ppdattr->value && strstr(ppdattr->value, "AutoConfigure")))
cb55925
         cgiSetVariable("HAVE_AUTOCONFIGURE", "YES");
cb55925
-      else 
cb55925
+      else
cb55925
       {
cb55925
         for (i = 0; i < ppd->num_filters; i ++)
cb55925
 	  if (!strncmp(ppd->filters[i], "application/vnd.cups-postscript", 31))
cb55925
@@ -3446,7 +3449,7 @@ do_set_options(http_t *http,		/* I - HTT
cb55925
 	  cgiSetVariable("GROUP", group->text);
cb55925
 
cb55925
 	cgiCopyTemplateLang("option-header.tmpl");
cb55925
-	
cb55925
+
cb55925
 	for (j = group->num_options, option = group->options;
cb55925
 	     j > 0;
cb55925
 	     j --, option ++)
cb55925
@@ -4090,7 +4093,7 @@ get_option_value(
cb55925
 
cb55925
     snprintf(buffer, bufsize, "Custom.%gx%g%s", width, length, uval);
cb55925
   }
cb55925
-  else if (cupsArrayCount(coption->params) == 1) 
cb55925
+  else if (cupsArrayCount(coption->params) == 1)
cb55925
   {
cb55925
     cparam = ppdFirstCustomParam(coption);
cb55925
     snprintf(keyword, sizeof(keyword), "%s.%s", coption->keyword, cparam->name);
cb55925
diff -up cups-1.4.2/CHANGES-1.4.txt.str3418 cups-1.4.2/CHANGES-1.4.txt