[prev in list] [next in list] [prev in thread] [next in thread]
List: cups-bugs
Subject: Re: [cups.bugs] [MOD] STR #4170: Ordering in printer listing broken
From: Michael Sweet <msweet () apple ! com>
Date: 2012-09-15 18:48:59
Message-ID: 20120915184900.7E2E13C68489 () dns ! easysw ! com
[Download RAW message or body]
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR Closed w/Resolution]
Fixed in Subversion repository.
Link: http://www.cups.org/str.php?L4170
Version: 1.5.3
Fix Version: 1.7-current (r10605)
["str4170.patch" (text/plain)]
Index: cgi-bin/printers.c
===================================================================
--- cgi-bin/printers.c (revision 10596)
+++ cgi-bin/printers.c (working copy)
@@ -397,7 +397,7 @@
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;
Index: cgi-bin/ipp-var.c
===================================================================
--- cgi-bin/ipp-var.c (revision 10596)
+++ cgi-bin/ipp-var.c (working copy)
@@ -1432,7 +1432,7 @@
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL,
"ipp://localhost/");
- if ((which_jobs = cgiGetVariable("which_jobs")) != NULL)
+ if ((which_jobs = cgiGetVariable("which_jobs")) != NULL && *which_jobs)
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "which-jobs",
NULL, which_jobs);
@@ -1480,10 +1480,11 @@
if (first < 0)
first = 0;
- if ((var = cgiGetVariable("ORDER")) != NULL)
+ if ((var = cgiGetVariable("ORDER")) != NULL && *var)
ascending = !_cups_strcasecmp(var, "asc");
else
- ascending = !which_jobs || !_cups_strcasecmp(which_jobs, "not-completed");
+ ascending = !which_jobs || !*which_jobs ||
+ !_cups_strcasecmp(which_jobs, "not-completed");
section = cgiGetVariable("SECTION");
Index: cgi-bin/classes.c
===================================================================
--- cgi-bin/classes.c (revision 10596)
+++ cgi-bin/classes.c (working copy)
@@ -380,7 +380,7 @@
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;
_______________________________________________
cups-bugs mailing list
cups-bugs@easysw.com
http://lists.easysw.com/mailman/listinfo/cups-bugs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic