RSS

(root)/bugzilla/trunk : 7375 : Bugzilla/CGI.pm

To get this branch, use:
bzr branch /bugzilla/trunk

« back to all changes in this revision

Viewing changes to Bugzilla/CGI.pm

Max Kanat-Alexander
2010-07-15 19:55:10
Revision ID: mkanat@bugzilla.org-20100716025510-anzk388p36nthy06
Bug 398308: Make Search.pm take a hashref for its "params" argument
instead of taking a CGI object.
r=mkanat, a=mkanat (module owner)

Show diffs side-by-side

added added

removed removed

110
110
sub canonicalise_query {
111
111
    my ($self, @exclude) = @_;
112
112
 
113
 
    $self->convert_old_params();
114
113
    # Reconstruct the URL by concatenating the sorted param=value pairs
115
114
    my @parameters;
116
115
    foreach my $key (sort($self->param())) {
135
134
    return join("&", @parameters);
136
135
}
137
136
 
138
 
sub convert_old_params {
139
 
    my $self = shift;
140
 
 
141
 
    # bugidtype is now bug_id_type.
142
 
    if ($self->param('bugidtype')) {
143
 
        my $value = $self->param('bugidtype') eq 'exclude' ? 'nowords' : 'anyexact';
144
 
        $self->param('bug_id_type', $value);
145
 
        $self->delete('bugidtype');
146
 
    }
147
 
}
148
 
 
149
137
sub clean_search_url {
150
138
    my $self = shift;
151
139
    # Delete any empty URL parameter.

Loggerhead 1.18.1 is a web-based interface for Bazaar branches