]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cgi-bin/printers.c
httpStatus(HTTP_ERROR) did not return a useful error message
[thirdparty/cups.git] / cgi-bin / printers.c
index ff379ff993738d28b8ceea85b29965743a3ad35f..37b0f552d60f46314b284d5eb282ac8530731029 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: printers.c 7940 2008-09-16 00:45:16Z mike $"
+ * "$Id$"
  *
  *   Printer status CGI for CUPS.
  *
- *   Copyright 2007-2011 by Apple Inc.
+ *   Copyright 2007-2012 by Apple Inc.
  *   Copyright 1997-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -266,7 +266,7 @@ do_printer_op(http_t      *http,    /* I - HTTP connection */
   else if (cupsLastError() > IPP_OK_CONFLICT)
   {
     cgiStartHTML(title);
-    cgiShowIPPError(_("Unable to do maintenance command:"));
+    cgiShowIPPError(_("Unable to do maintenance command"));
   }
   else
   {
@@ -397,7 +397,7 @@ show_all_printers(http_t     *http, /* I - Connection to server */
     sprintf(val, "%d", count);
     cgiSetVariable("TOTAL", val);
 
-    if ((var = cgiGetVariable("ORDER")) != NULL)
+    if ((var = cgiGetVariable("ORDER")) != NULL && *var)
       ascending = !_cups_strcasecmp(var, "asc");
     else
       ascending = 1;
@@ -464,7 +464,7 @@ show_all_printers(http_t     *http, /* I - Connection to server */
     * Show the error...
     */
 
-    cgiShowIPPError(_("Unable to get printer list:"));
+    cgiShowIPPError(_("Unable to get printer list"));
   }
 
    cgiEndHTML();
@@ -566,7 +566,7 @@ show_printer(http_t     *http,              /* I - Connection to server */
     */
 
     cgiStartHTML(printer);
-    cgiShowIPPError(_("Unable to get printer status:"));
+    cgiShowIPPError(_("Unable to get printer status"));
   }
 
    cgiEndHTML();
@@ -574,5 +574,5 @@ show_printer(http_t     *http,              /* I - Connection to server */
 
 
 /*
- * End of "$Id: printers.c 7940 2008-09-16 00:45:16Z mike $".
+ * End of "$Id$".
  */