1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
6
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7
<link rel="stylesheet" title="style" type="text/css" href="../style.css" media="all" >
11
<p class="backlinktop"><b><a name="___top" href="../index.html" accesskey="1" title="All Documents"><<</a></b></p>
12
<h1>Bugzilla::CGI</h1>
13
<div class='indexgroup'>
14
<ul class='indexList indexList1'>
15
<li class='indexItem indexItem1'><a href='#NAME'>NAME</a>
16
<li class='indexItem indexItem1'><a href='#SYNOPSIS'>SYNOPSIS</a>
17
<li class='indexItem indexItem1'><a href='#DESCRIPTION'>DESCRIPTION</a>
18
<li class='indexItem indexItem1'><a href='#CHANGES_FROM_CGI.PM'>CHANGES FROM CGI.PM</a>
19
<li class='indexItem indexItem1'><a href='#ADDITIONAL_FUNCTIONS'>ADDITIONAL FUNCTIONS</a>
20
<li class='indexItem indexItem1'><a href='#SEE_ALSO'>SEE ALSO</a>
24
<h1><a class='u' href='#___top' title='click to go to top of document'
28
<p>Bugzilla::CGI - CGI handling for Bugzilla</p>
30
<h1><a class='u' href='#___top' title='click to go to top of document'
34
<pre class="code"> use Bugzilla::CGI;
36
my $cgi = new Bugzilla::CGI();</pre>
38
<h1><a class='u' href='#___top' title='click to go to top of document'
42
<p>This package inherits from the standard CGI module, to provide additional Bugzilla-specific functionality. In general, see <a href="../CGI.html" class="podlinkpod"
43
>the CGI.pm docs</a> for documention.</p>
45
<h1><a class='u' href='#___top' title='click to go to top of document'
46
name="CHANGES_FROM_CGI.PM"
47
>CHANGES FROM <a href="../CGI.html" class="podlinkpod"
50
<p>Bugzilla::CGI has some differences from <a href="../CGI.html" class="podlinkpod"
54
<dt><a name="cgi_error_is_automatically_checked"
55
><code class="code">cgi_error</code> is automatically checked</a></dt>
58
<p>After creating the CGI object, <code class="code">Bugzilla::CGI</code> automatically checks <i>cgi_error</i>, and throws a CodeError if a problem is detected.</p>
62
<h1><a class='u' href='#___top' title='click to go to top of document'
63
name="ADDITIONAL_FUNCTIONS"
64
>ADDITIONAL FUNCTIONS</a></h1>
66
<p><i>Bugzilla::CGI</i> also includes additional functions.</p>
69
<dt><a name="canonicalise_query(@exclude)"
70
><code class="code">canonicalise_query(@exclude)</code></a></dt>
73
<p>This returns a sorted string of the parameters, suitable for use in a url. Values in <code class="code">@exclude</code> are not included in the result.</p>
75
<dt><a name="send_cookie"
76
><code class="code">send_cookie</code></a></dt>
79
<p>This routine is identical to the cookie generation part of CGI.pm's <code class="code">cookie</code> routine, except that it knows about Bugzilla's cookie_path and cookie_domain parameters and takes them into account if necessary. This should be used by all Bugzilla code (instead of <code class="code">cookie</code> or the <code class="code">-cookie</code> argument to <code class="code">header</code>), so that under mod_perl the headers can be sent correctly, using <code class="code">print</code> or the mod_perl APIs as appropriate.</p>
81
<p>To remove (expire) a cookie, use <code class="code">remove_cookie</code>.</p>
83
<dt><a name="remove_cookie"
84
><code class="code">remove_cookie</code></a></dt>
87
<p>This is a wrapper around send_cookie, setting an expiry date in the past, effectively removing the cookie.</p>
89
<p>As its only argument, it takes the name of the cookie to expire.</p>
91
<dt><a name="require_https($baseurl)"
92
><code class="code">require_https($baseurl)</code></a></dt>
95
<p>This routine checks if the current page is being served over https, and redirects to the https protocol if required, retaining QUERY_STRING.</p>
97
<p>It takes an option argument which will be used as the base URL. If $baseurl is not provided, the current URL is used.</p>
101
<h1><a class='u' href='#___top' title='click to go to top of document'
105
<p><a href="../CGI.html" class="podlinkpod"
106
>CGI</a>, <a href="../CGI/Cookie.html" class="podlinkpod"
108
<p class="backlinkbottom"><b><a name="___bottom" href="../index.html" title="All Documents"><<</a></b></p>