diff options
author | Michael R Sweet <michael.r.sweet@gmail.com> | 2018-06-18 13:13:40 -0400 |
---|---|---|
committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2018-06-18 13:13:40 -0400 |
commit | 553f29c967a3451cb142a7a91561fcc4c20bb354 (patch) | |
tree | dd29a346263c418fccc62fd68dc67707cc897050 /cgi-bin | |
parent | 91505c0a326ec53ef6d2b82c9efd8029fac7ae01 (diff) | |
download | cups-553f29c967a3451cb142a7a91561fcc4c20bb354.tar.gz |
Support IPP Everywhere driver in web interface (Issue #5338)
Diffstat (limited to 'cgi-bin')
-rw-r--r-- | cgi-bin/admin.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/cgi-bin/admin.c b/cgi-bin/admin.c index f788083fb..a3b5057b0 100644 --- a/cgi-bin/admin.c +++ b/cgi-bin/admin.c @@ -1,10 +1,11 @@ /* * Administration CGI for CUPS. * - * Copyright 2007-2017 by Apple Inc. - * Copyright 1997-2007 by Easy Software Products. + * Copyright © 2007-2018 by Apple Inc. + * Copyright © 1997-2007 by Easy Software Products. * - * Licensed under Apache License v2.0. See the file "LICENSE" for more information. + * Licensed under Apache License v2.0. See the file "LICENSE" for more + * information. */ /* @@ -928,6 +929,8 @@ do_am_printer(http_t *http, /* I - HTTP connection */ else if (!file && (!cgiGetVariable("PPD_NAME") || cgiGetVariable("SELECT_MAKE"))) { + int ipp_everywhere = !strncmp(var, "ipp://", 6) || !strncmp(var, "ipps://", 7) || (!strncmp(var, "dnssd://", 8) && (strstr(var, "_ipp._tcp") || strstr(var, "_ipps._tcp"))); + if (modify && !cgiGetVariable("SELECT_MAKE")) { /* @@ -1076,6 +1079,8 @@ do_am_printer(http_t *http, /* I - HTTP connection */ if (!modify) cgiSetVariable("CURRENT_MAKE_AND_MODEL", cgiGetArray("PPD_MAKE_AND_MODEL", 0)); + if (ipp_everywhere) + cgiSetVariable("SHOW_IPP_EVERYWHERE", "1"); cgiCopyTemplateLang("choose-model.tmpl"); cgiEndHTML(); } |