]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cgi-bin/jobs.c
Load cups into easysw/current.
[thirdparty/cups.git] / cgi-bin / jobs.c
index 3a14cc0836e069de6a561fbb5cd653046c479ba6..da4f1357cdb6956b03289ab8cfe7d5408ac63930 100644 (file)
@@ -1,25 +1,16 @@
 /*
- * "$Id: jobs.c 177 2006-06-21 00:20:03Z jlovell $"
+ * "$Id: jobs.c 6649 2007-07-11 21:46:42Z mike $"
  *
  *   Job status CGI for the Common UNIX Printing System (CUPS).
  *
+ *   Copyright 2007 by Apple Inc.
  *   Copyright 1997-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
- *   property of Easy Software Products and are protected by Federal
- *   copyright law.  Distribution and use rights are outlined in the file
- *   "LICENSE.txt" which should have been included with this file.  If this
- *   file is missing or damaged please contact Easy Software Products
- *   at:
- *
- *       Attn: CUPS Licensing Information
- *       Easy Software Products
- *       44141 Airport View Drive, Suite 204
- *       Hollywood, Maryland 20636 USA
- *
- *       Voice: (301) 373-9600
- *       EMail: cups-info@cups.org
- *         WWW: http://www.cups.org
+ *   property of Apple Inc. and are protected by Federal copyright
+ *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+ *   which should have been included with this file.  If this file is
+ *   file is missing or damaged, see the license at "http://www.cups.org/".
  *
  * Contents:
  *
@@ -181,6 +172,20 @@ do_job_op(http_t      *http,               /* I - HTTP connection */
 
   ippDelete(cupsDoRequest(http, request, "/jobs"));
 
+  if (cupsLastError() <= IPP_OK_CONFLICT && getenv("HTTP_REFERER"))
+  {
+   /*
+    * Redirect successful updates back to the parent page...
+    */
+
+    char       url[1024];              /* Encoded URL */
+
+
+    strcpy(url, "5;URL=");
+    cgiFormEncode(url + 6, getenv("HTTP_REFERER"), sizeof(url) - 6);
+    cgiSetVariable("refresh_page", url);
+  }
+
   cgiStartHTML(cgiText(_("Jobs")));
 
   if (cupsLastError() > IPP_OK_CONFLICT)
@@ -199,5 +204,5 @@ do_job_op(http_t      *http,                /* I - HTTP connection */
 
 
 /*
- * End of "$Id: jobs.c 177 2006-06-21 00:20:03Z jlovell $".
+ * End of "$Id: jobs.c 6649 2007-07-11 21:46:42Z mike $".
  */