]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Support IPP Everywhere driver in web interface (Issue #5338)
authorMichael R Sweet <michael.r.sweet@gmail.com>
Mon, 18 Jun 2018 17:13:40 +0000 (13:13 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Mon, 18 Jun 2018 17:13:40 +0000 (13:13 -0400)
CHANGES.md
backend/dnssd.c
cgi-bin/admin.c
templates/choose-model.tmpl
templates/de/choose-model.tmpl
templates/es/choose-model.tmpl
templates/fr/choose-model.tmpl
templates/ja/choose-model.tmpl
templates/pt_BR/choose-model.tmpl
templates/ru/choose-model.tmpl

index c7438f9b72692c0ed2d40add6ecf77c105d1b73a..4fa1803cd1999139da3fe1dfff9590de3641b3d9 100644 (file)
@@ -7,6 +7,7 @@ Changes in CUPS v2.3b6
 - Localization update (Issue #5339)
 - Fixed a regression in the changes to ippValidateAttribute (Issue #5322,
   Issue #5330)
+- The web interface did not list the IPP Everywhere "driver" (Issue #5338)
 - The scheduler did not report all of the supported job options and values
   (Issue #5340)
 - Fixed a memory leak for some IPP (extension) syntaxes.
index 34781d5ceaa9714f7dbc066386a6994e07fbdcf9..7074f4294abc4613bcf9b798f64eebca3b1254b4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * DNS-SD discovery backend for CUPS.
  *
- * Copyright © 2008-2017 by Apple Inc.
+ * Copyright © 2008-2018 by Apple Inc.
  *
  * Licensed under Apache License v2.0.  See the file "LICENSE" for more
  * information.
@@ -1252,6 +1252,13 @@ query_callback(
     strlcat(make_and_model, " ", sizeof(make_and_model));
     strlcat(make_and_model, model, sizeof(make_and_model));
 
+    if (!_cups_strncasecmp(make_and_model, "EPSON EPSON ", 12))
+      _cups_strcpy(make_and_model, make_and_model + 6);
+    else if (!_cups_strncasecmp(make_and_model, "HP HP ", 6))
+      _cups_strcpy(make_and_model, make_and_model + 3);
+    else if (!_cups_strncasecmp(make_and_model, "Lexmark International Lexmark ", 30))
+      _cups_strcpy(make_and_model, make_and_model + 22);
+
     device->make_and_model = strdup(make_and_model);
   }
   else
index f788083fb0bbd5d6d1482b7e8388ccb479e3edb1..a3b5057b0e734438ba0421b2fdcb7894b4416c97 100644 (file)
@@ -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();
       }
index ee9338cc5c9f5cab52996409c57fa933d38ebb15..d72534236f61805418357ee035a216c33c8d1059 100644 (file)
@@ -39,6 +39,7 @@
 <TD>
 <SELECT NAME="PPD_NAME" SIZE="10">
 {op=add-printer?:<OPTION VALUE="__no_change__" SELECTED>Current Driver - {current_make_and_model}</OPTION>:}
+{show_ipp_everywhere?<OPTION VALUE="everywhere" SELECTED>IPP Everywhere &trade;</OPTION>:}
 {[ppd_name]<OPTION VALUE="{ppd_name}" {op=modify-printer?:{?current_make_and_model={ppd_make_and_model}?SELECTED:}}>{ppd_make_and_model} ({ppd_natural_language})
 }</SELECT>
 </TD>
index cb9b6f3bc237537583e029b094b10f441825d5f1..a08a8e3e0cec29f5ebffd13dd24688571a0ab56e 100644 (file)
@@ -39,6 +39,7 @@ Drucker {?printer_is_shared=?nicht:{?printer_is_shared=0?nicht:}} im Netzwerk fr
 <TD>
 <SELECT NAME="PPD_NAME" SIZE="10">
 {op=add-printer?:<OPTION VALUE="__no_change__" SELECTED>Aktueller Treiber - {current_make_and_model}</OPTION>:}
+{show_ipp_everywhere?<OPTION VALUE="everywhere" SELECTED>IPP Everywhere &trade;</OPTION>:}
 {[ppd_name]<OPTION VALUE="{ppd_name}" {op=modify-printer?:{?current_make_and_model={ppd_make_and_model}?SELECTED:}}>{ppd_make_and_model} ({ppd_natural_language})
 }</SELECT>
 </TD>
index 8a5a4ba90a9f33c1b016ebb0e4950e4807677f74..74f0a9bb9de52307a8ae09853ae5210d0deec493 100644 (file)
@@ -39,6 +39,7 @@
 <TD>
 <SELECT NAME="PPD_NAME" SIZE="10">
 {op=add-printer?:<OPTION VALUE="__no_change__" SELECTED>Controlador actual - {current_make_and_model}</OPTION>:}
+{show_ipp_everywhere?<OPTION VALUE="everywhere" SELECTED>IPP Everywhere &trade;</OPTION>:}
 {[ppd_name]<OPTION VALUE="{ppd_name}" {op=modify-printer?:{?current_make_and_model={ppd_make_and_model}?SELECTED:}}>{ppd_make_and_model} ({ppd_natural_language})
 }</SELECT>
 </TD>
index 1e154f18a79e228a47a9b0d0bd9b4f4d22d81e77..3038b3fe3cdfb7a6d8ed30216d571d1e4ccf89de 100644 (file)
@@ -39,6 +39,7 @@
 <TD>
 <SELECT NAME="PPD_NAME" SIZE="10">
 {op=add-printer?:<OPTION VALUE="__no_change__" SELECTED>Pilote actuel - {current_make_and_model}</OPTION>:}
+{show_ipp_everywhere?<OPTION VALUE="everywhere" SELECTED>IPP Everywhere &trade;</OPTION>:}
 {[ppd_name]<OPTION VALUE="{ppd_name}" {op=modify-printer?:{?current_make_and_model={ppd_make_and_model}?SELECTED:}}>{ppd_make_and_model} ({ppd_natural_language})
 }</SELECT>
 </TD>
index daf1375fd8b5743381b3153e04919d052cf3be6e..b3c286b117699948a23af14d0c1a9e0cadeb1df5 100644 (file)
@@ -39,6 +39,7 @@
 <TD>
 <SELECT NAME="PPD_NAME" SIZE="10">
 {op=add-printer?:<OPTION VALUE="__no_change__" SELECTED>現在のドライバー - {current_make_and_model}</OPTION>:}
+{show_ipp_everywhere?<OPTION VALUE="everywhere" SELECTED>IPP Everywhere &trade;</OPTION>:}
 {[ppd_name]<OPTION VALUE="{ppd_name}" {op=modify-printer?:{?current_make_and_model={ppd_make_and_model}?SELECTED:}}>{ppd_make_and_model} ({ppd_natural_language})
 }</SELECT>
 </TD>
index 55d8bd8d5d6ece8d2002ea29124ab3905fb56472..a5939ee9cb17344b412e2f174922e3fa406690a5 100644 (file)
@@ -39,6 +39,7 @@
 <TD>
 <SELECT NAME="PPD_NAME" SIZE="10">
 {op=add-printer?:<OPTION VALUE="__no_change__" SELECTED>Driver atual - {current_make_and_model}</OPTION>:}
+{show_ipp_everywhere?<OPTION VALUE="everywhere" SELECTED>IPP Everywhere &trade;</OPTION>:}
 {[ppd_name]<OPTION VALUE="{ppd_name}" {op=modify-printer?:{?current_make_and_model={ppd_make_and_model}?SELECTED:}}>{ppd_make_and_model} ({ppd_natural_language})
 }</SELECT>
 </TD>
index 2f0d6d9bab24ef2ac880723131b0a0579b189d2b..86507814dc71bfe17a3a7a17b3ef84c95cc00ee3 100644 (file)
@@ -39,6 +39,7 @@
 <TD>
 <SELECT NAME="PPD_NAME" SIZE="10">
 {op=add-printer?:<OPTION VALUE="__no_change__" SELECTED>Текущий драйвер - {current_make_and_model}</OPTION>:}
+{show_ipp_everywhere?<OPTION VALUE="everywhere" SELECTED>IPP Everywhere &trade;</OPTION>:}
 {[ppd_name]<OPTION VALUE="{ppd_name}" {op=modify-printer?:{?current_make_and_model={ppd_make_and_model}?SELECTED:}}>{ppd_make_and_model} ({ppd_natural_language})
 }</SELECT>
 </TD>