/*
- * "$Id: ipp-var.c 5097 2006-02-10 04:06:23Z mike $"
+ * "$Id: ipp-var.c 5235 2006-03-06 13:02:23Z mike $"
*
* CGI <-> IPP variable routines for the Common UNIX Printing System (CUPS).
*
if ((server = getenv("SERVER_NAME")) == NULL)
server = "";
- httpGetHostname(servername, sizeof(servername));
+ httpGetHostname(NULL, servername, sizeof(servername));
/*
* Then flag whether we are using SSL on this connection...
break;
case IPP_TAG_URI :
- if (strchr(attr->values[i].string.text, ':') != NULL)
+ if (strchr(attr->values[i].string.text, ':') &&
+ strcmp(name, "device_uri"))
{
/*
* Rewrite URIs...
if ((var = cgiGetVariable("ORDER")) != NULL)
ascending = !strcasecmp(var, "asc");
else
- ascending = 1;
+ {
+ ascending = !which_jobs || !strcasecmp(which_jobs, "not-completed");
+ cgiSetVariable("ORDER", ascending ? "asc" : "dec");
+ }
if (ascending)
{
/*
- * End of "$Id: ipp-var.c 5097 2006-02-10 04:06:23Z mike $".
+ * End of "$Id: ipp-var.c 5235 2006-03-06 13:02:23Z mike $".
*/