View | Details | Raw Unified | Return to bug 10937
Collapse All | Expand All

(-)a/C4/Koha.pm (-1 / +39 lines)
Lines 40-46 BEGIN { Link Here
40
		&slashifyDate
40
		&slashifyDate
41
		&subfield_is_koha_internal_p
41
		&subfield_is_koha_internal_p
42
		&GetPrinters &GetPrinter
42
		&GetPrinters &GetPrinter
43
		&GetItemTypes &getitemtypeinfo
43
		&GetItemTypes &GetItemTypesCategorized &GetItemTypesByCategory &getitemtypeinfo
44
		&GetSupportName &GetSupportList
44
		&GetSupportName &GetSupportList
45
		&get_itemtypeinfos_of
45
		&get_itemtypeinfos_of
46
		&getframeworks &getframeworkinfo
46
		&getframeworks &getframeworkinfo
Lines 269-274 sub GetItemTypes { Link Here
269
    }
269
    }
270
}
270
}
271
271
272
# Returns item types but grouped by category if available.
273
# The categories must be part of Authorized Values (DOCTYPECAT)
274
sub GetItemTypesCategorized {
275
    my $dbh   = C4::Context->dbh;
276
    my $query = qq|
277
        SELECT itemtype, description, imageurl, hideinopac, 0 as 'iscat' FROM itemtypes WHERE ISNULL(searchcategory)
278
        UNION
279
        SELECT DISTINCT searchcategory AS `itemtype`, authorised_values.lib_opac AS description, authorised_values.imageurl AS imageurl, hideinopac, 1 as 'iscat'
280
            FROM itemtypes
281
	    LEFT JOIN authorised_values ON searchcategory = authorised_value
282
            WHERE searchcategory > ''
283
        |;
284
    my $sth = $dbh->prepare($query);
285
    $sth->execute;
286
287
    my %itemtypes;
288
    while ( my $IT = $sth->fetchrow_hashref ) {
289
        $itemtypes{ $IT->{'itemtype'} } = $IT;
290
    }
291
292
    return ( \%itemtypes );
293
}
294
295
# Returns the itemtypes that are grouped into the category.
296
sub GetItemTypesByCategory {
297
    my ($category) = @_;
298
    my $count = 0;
299
    my @results;
300
    my $dbh = C4::Context->dbh;
301
    my $sth = $dbh->prepare("SELECT itemtype FROM itemtypes WHERE searchcategory=?");
302
    $sth->execute($category);
303
304
    while ( my $data = $sth->fetchrow ) {
305
        push ( @results, $data );
306
    }
307
    return @results;
308
}
309
272
sub get_itemtypeinfos_of {
310
sub get_itemtypeinfos_of {
273
    my @itemtypes = @_;
311
    my @itemtypes = @_;
274
312
(-)a/admin/itemtypes.pl (-2 / +12 lines)
Lines 109-114 if ( $op eq 'add_form' ) { Link Here
109
        $remote_image = $data->{imageurl};
109
        $remote_image = $data->{imageurl};
110
    }
110
    }
111
111
112
    my $searchcategory = GetAuthorisedValues("DOCTYPECAT", $data->{'searchcategory'});
113
112
    $template->param(
114
    $template->param(
113
        itemtype        => $itemtype,
115
        itemtype        => $itemtype,
114
        description     => $data->{'description'},
116
        description     => $data->{'description'},
Lines 121-126 if ( $op eq 'add_form' ) { Link Here
121
        checkinmsgtype  => $data->{'checkinmsgtype'},
123
        checkinmsgtype  => $data->{'checkinmsgtype'},
122
        imagesets       => $imagesets,
124
        imagesets       => $imagesets,
123
        remote_image    => $remote_image,
125
        remote_image    => $remote_image,
126
        hideinopac   => $data->{'hideinopac'},
127
        searchcategory  => $searchcategory,
124
    );
128
    );
125
129
126
    # END $OP eq ADD_FORM
130
    # END $OP eq ADD_FORM
Lines 145-150 elsif ( $op eq 'add_validate' ) { Link Here
145
                 , summary = ?
149
                 , summary = ?
146
                 , checkinmsg = ?
150
                 , checkinmsg = ?
147
                 , checkinmsgtype = ?
151
                 , checkinmsgtype = ?
152
                 , hideinopac = ?
153
                 , searchcategory = ?
148
            WHERE itemtype = ?
154
            WHERE itemtype = ?
149
        ';
155
        ';
150
        $sth = $dbh->prepare($query2);
156
        $sth = $dbh->prepare($query2);
Lines 162-176 elsif ( $op eq 'add_validate' ) { Link Here
162
            $input->param('summary'),
168
            $input->param('summary'),
163
            $input->param('checkinmsg'),
169
            $input->param('checkinmsg'),
164
            $input->param('checkinmsgtype'),
170
            $input->param('checkinmsgtype'),
171
            ( $input->param('hideinopac') ? 1 : 0 ),
172
            $input->param('searchcategory'),
165
            $input->param('itemtype')
173
            $input->param('itemtype')
166
        );
174
        );
167
    }
175
    }
168
    else {    # add a new itemtype & not modif an old
176
    else {    # add a new itemtype & not modif an old
169
        my $query = "
177
        my $query = "
170
            INSERT INTO itemtypes
178
            INSERT INTO itemtypes
171
                (itemtype,description,rentalcharge, notforloan, imageurl, summary, checkinmsg, checkinmsgtype)
179
                (itemtype,description,rentalcharge, notforloan, imageurl, summary, checkinmsg, checkinmsgtype, hideinopac,searchcategory)
172
            VALUES
180
            VALUES
173
                (?,?,?,?,?,?,?,?);
181
                (?,?,?,?,?,?,?,?,?,?);
174
            ";
182
            ";
175
        my $sth = $dbh->prepare($query);
183
        my $sth = $dbh->prepare($query);
176
		my $image = $input->param('image');
184
		my $image = $input->param('image');
Lines 185-190 elsif ( $op eq 'add_validate' ) { Link Here
185
            $input->param('summary'),
193
            $input->param('summary'),
186
            $input->param('checkinmsg'),
194
            $input->param('checkinmsg'),
187
            $input->param('checkinmsgtype'),
195
            $input->param('checkinmsgtype'),
196
            $input->param('hideinopac') ? 1 : 0,
197
	        $input->param('searchcategory'),
188
        );
198
        );
189
    }
199
    }
190
200
(-)a/installer/data/mysql/kohastructure.sql
Lines 2-8 Link Here
2
--
2
--
3
-- Host: localhost    Database: koha30test
3
-- Host: localhost    Database: koha30test
4
-- ------------------------------------------------------
4
-- ------------------------------------------------------
(-)Server version (-11 / +12 lines)
Lines 1214-1219 CREATE TABLE `itemtypes` ( -- defines the item types Link Here
1214
  summary text, -- information from the summary field, may include HTML
1214
  summary text, -- information from the summary field, may include HTML
1215
  checkinmsg VARCHAR(255), -- message that is displayed when an item with the given item type is checked in
1215
  checkinmsg VARCHAR(255), -- message that is displayed when an item with the given item type is checked in
1216
  checkinmsgtype CHAR(16) DEFAULT 'message' NOT NULL, -- type (CSS class) for the checkinmsg, can be "alert" or "message"
1216
  checkinmsgtype CHAR(16) DEFAULT 'message' NOT NULL, -- type (CSS class) for the checkinmsg, can be "alert" or "message"
1217
  hideinopac tinyint(1) NOT NULL DEFAULT 0, -- Hide the item type from the search options in OPAC
1218
  searchcategory varchar(15) default NULL, -- Group this item type with others with the same value on OPAC search options
1217
  PRIMARY KEY  (`itemtype`),
1219
  PRIMARY KEY  (`itemtype`),
1218
  UNIQUE KEY `itemtype` (`itemtype`)
1220
  UNIQUE KEY `itemtype` (`itemtype`)
1219
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1221
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Lines 2109-2118 CREATE TABLE `suggestions` ( -- purchase suggestions Link Here
2109
   branchcode VARCHAR(10) default NULL, -- foreign key linking the suggested branch to the branches table
2111
   branchcode VARCHAR(10) default NULL, -- foreign key linking the suggested branch to the branches table
2110
   collectiontitle text default NULL, -- collection name for the suggested item
2112
   collectiontitle text default NULL, -- collection name for the suggested item
2111
   itemtype VARCHAR(30) default NULL, -- suggested item type 
2113
   itemtype VARCHAR(30) default NULL, -- suggested item type 
2112
	quantity SMALLINT(6) default NULL, -- suggested quantity to be purchased
2114
    quantity SMALLINT(6) default NULL, -- suggested quantity to be purchased
2113
	currency VARCHAR(3) default NULL, -- suggested currency for the suggested price
2115
    currency VARCHAR(3) default NULL, -- suggested currency for the suggested price
2114
	price DECIMAL(28,6) default NULL, -- suggested price
2116
    price DECIMAL(28,6) default NULL, -- suggested price
2115
	total DECIMAL(28,6) default NULL, -- suggested total cost (price*quantity updated for currency)
2117
    total DECIMAL(28,6) default NULL, -- suggested total cost (price*quantity updated for currency)
2116
  PRIMARY KEY  (`suggestionid`),
2118
  PRIMARY KEY  (`suggestionid`),
2117
  KEY `suggestedby` (`suggestedby`),
2119
  KEY `suggestedby` (`suggestedby`),
2118
  KEY `managedby` (`managedby`)
2120
  KEY `managedby` (`managedby`)
Lines 2410-2421 CREATE TABLE `permissions` ( Link Here
2410
2412
2411
DROP TABLE IF EXISTS `serialitems`;
2413
DROP TABLE IF EXISTS `serialitems`;
2412
CREATE TABLE `serialitems` (
2414
CREATE TABLE `serialitems` (
2413
	`itemnumber` int(11) NOT NULL,
2415
    `itemnumber` int(11) NOT NULL,
2414
	`serialid` int(11) NOT NULL,
2416
    `serialid` int(11) NOT NULL,
2415
	UNIQUE KEY `serialitemsidx` (`itemnumber`),
2417
    UNIQUE KEY `serialitemsidx` (`itemnumber`),
2416
	KEY `serialitems_sfk_1` (`serialid`),
2418
    KEY `serialitems_sfk_1` (`serialid`),
2417
	CONSTRAINT `serialitems_sfk_1` FOREIGN KEY (`serialid`) REFERENCES `serial` (`serialid`) ON DELETE CASCADE ON UPDATE CASCADE,
2419
    CONSTRAINT `serialitems_sfk_1` FOREIGN KEY (`serialid`) REFERENCES `serial` (`serialid`) ON DELETE CASCADE ON UPDATE CASCADE,
2418
	CONSTRAINT `serialitems_sfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE
2420
    CONSTRAINT `serialitems_sfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE
2419
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2421
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2420
2422
2421
--
2423
--
Lines 3284-3287 ALTER TABLE `patron_list_patrons` Link Here
3284
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
3286
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
3285
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
3287
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
3286
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
3288
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
3287
(-)a/installer/data/mysql/updatedatabase.pl (+9 lines)
Lines 7306-7311 if ( CheckVersion($DBversion) ) { Link Here
7306
    SetVersion($DBversion);
7306
    SetVersion($DBversion);
7307
}
7307
}
7308
7308
7309
$DBversion = "3.13.00.XXX";
7310
if ( CheckVersion($DBversion) ) {
7311
    $dbh->do(q{
7312
        ALTER TABLE itemtypes
7313
            ADD hideinopac TINYINT(1) NOT NULL DEFAULT 0,
7314
            ADD searchcategory VARCHAR(15) DEFAULT NULL;
7315
    });
7316
}
7317
7309
=head1 FUNCTIONS
7318
=head1 FUNCTIONS
7310
7319
7311
=head2 TableExists($table)
7320
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt (+46 lines)
Lines 159-164 Item types administration Link Here
159
      [% ELSE %]
159
      [% ELSE %]
160
          <label for="description">Description: </label><input type="text" id="description" name="description" size="48" value="[% description |html %]" /></li>
160
          <label for="description">Description: </label><input type="text" id="description" name="description" size="48" value="[% description |html %]" /></li>
161
      [% END %]
161
      [% END %]
162
163
      <li>
164
      [% IF ( itemtype ) %]
165
          <span class="label">Search category</span>
166
          <select id="searchcategory" name="searchcategory">
167
          <option value="">None</option>
168
                [% FOREACH cat IN searchcategory %]
169
                    [% IF ( cat.selected ) %]
170
                        <option value="[% cat.authorised_value %]" selected="selected">
171
                            [% cat.lib %]
172
                        </option>
173
                    [% ELSE %]
174
                        <option value="[% cat.authorised_value %]" >
175
                            [% cat.lib %]
176
                        </option>
177
                    [% END %]
178
                [% END %]
179
          </select>
180
      </li>
181
      [% ELSE %]
182
      <span class="label">Search category</span>
183
      <select id="searchcategory" name="searchcategory">
184
      <option value="" />
185
          [% FOREACH cat IN categorysearch %]
186
              <option value="[% cat.authorised_value %]" >
187
                  [% cat.lib %]
188
              </option>
189
          [% END %]
190
      </select>
191
      </li>
192
      [% END %]
193
162
     [% IF ( noItemTypeImages ) %]
194
     [% IF ( noItemTypeImages ) %]
163
	 <li><span class="label">Image: </span>Item type images are disabled. To enable them, turn off the <a href="/cgi-bin/koha/admin/preferences.pl?op=search&amp;searchfield=noItemTypeImages">noItemTypeImages system preference</a></li></ol>
195
	 <li><span class="label">Image: </span>Item type images are disabled. To enable them, turn off the <a href="/cgi-bin/koha/admin/preferences.pl?op=search&amp;searchfield=noItemTypeImages">noItemTypeImages system preference</a></li></ol>
164
	 [% ELSE %]</ol>
196
	 [% ELSE %]</ol>
Lines 214-219 Item types administration Link Here
214
</div>
246
</div>
215
<ol>
247
<ol>
216
      <li>
248
      <li>
249
          <label for="hideinopac">Hide in OPAC: </label>
250
          [% IF ( hideinopac ) %]
251
              <input type="checkbox" id="hideinopac" name="hideinopac" checked="checked" value="1" />
252
          [% ELSE %]
253
              <input type="checkbox" id="hideinopac" name="hideinopac" value="1" />
254
          [% END %]
255
          (if checked, items of this type will be hidden as filters in OPAC's Advanded Search)
256
      </li>
257
      <li>
258
217
          <label for="notforloan">Not for loan: </label>   [% IF ( notforloan ) %]
259
          <label for="notforloan">Not for loan: </label>   [% IF ( notforloan ) %]
218
                <input type="checkbox" id="notforloan" name="notforloan" checked="checked" value="1" />
260
                <input type="checkbox" id="notforloan" name="notforloan" checked="checked" value="1" />
219
            [% ELSE %]
261
            [% ELSE %]
Lines 297-303 Item types administration Link Here
297
    [% UNLESS ( noItemTypeImages ) %]<th>Image</th>[% END %]
339
    [% UNLESS ( noItemTypeImages ) %]<th>Image</th>[% END %]
298
    <th>Code</th>
340
    <th>Code</th>
299
    <th>Description</th>
341
    <th>Description</th>
342
    <th>Search category</th>
300
    <th>Not for loan</th>
343
    <th>Not for loan</th>
344
    <th>Hide in OPAC</th>
301
    <th>Charge</th>
345
    <th>Charge</th>
302
    <th>Checkin message</th>
346
    <th>Checkin message</th>
303
    <th>Actions</th>
347
    <th>Actions</th>
Lines 315-321 Item types administration Link Here
315
      </a>
359
      </a>
316
    </td>
360
    </td>
317
    <td>[% loo.description %]</td>
361
    <td>[% loo.description %]</td>
362
    <td>[% loo.searchcategory %]</td>
318
    <td>[% IF ( loo.notforloan ) %]Yes[% ELSE %]&nbsp;[% END %]</td>
363
    <td>[% IF ( loo.notforloan ) %]Yes[% ELSE %]&nbsp;[% END %]</td>
364
    <td>[% IF ( loo.hideinopac ) %]Yes[% ELSE %]&nbsp;[% END %]</td>
319
    <td>
365
    <td>
320
    [% UNLESS ( loo.notforloan ) %]
366
    [% UNLESS ( loo.notforloan ) %]
321
      [% loo.rentalcharge %]
367
      [% loo.rentalcharge %]
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt (-6 / +14 lines)
Lines 186-197 Link Here
186
    <fieldset>
186
    <fieldset>
187
    <legend>Limit to any of the following:</legend>
187
    <legend>Limit to any of the following:</legend>
188
    <table>
188
    <table>
189
        <tr>
189
        <tr>[% count = 0 %]
190
    [% FOREACH itemtypeloo IN advsearchloo.code_loop %]
190
        [% FOREACH itemtype IN advsearchloo.code_loop %]
191
        <td><input type="checkbox" id="[% itemtypeloo.ccl FILTER remove(',') %]-[% itemtypeloo.number %]" name="limit" value="mc-[% itemtypeloo.ccl %]:[% itemtypeloo.code %]"/><label for="[% itemtypeloo.ccl FILTER remove(',') %]-[% itemtypeloo.number %]">[% UNLESS ( noItemTypeImages ) %][% IF ( itemtypeloo.imageurl ) %]<img border="0" src="[% itemtypeloo.imageurl %]" alt="[% itemtypeloo.description %]" />[% END %]&nbsp;[% END %]
191
            [% IF ((!itemtype.searchcategory) AND (itemtype.cat == 0)) OR (itemtype.cat == 1) %]
192
        [% itemtypeloo.description %]</label></td>
192
                [% count = (count + 1) %]
193
        [% IF ( loop.last ) %]</tr>[% ELSE %][% UNLESS ( loop.count % 5 ) %]</tr><tr>[% END %][% END %]
193
                <td>
194
    [% END %]
194
                <input type="checkbox" id="[% itemtype.ccl FILTER remove(',') %]-[% itemtype.number %]" name="[% IF ( itemtype.cat == 1 ) %]searchcat[% ELSE %]limit[% END %]" value="[% IF ( itemtype.cat == 1 ) %][% itemtype.code %][% ELSE %]mc-[% itemtype.ccl %]:[% itemtype.code %][% END %]"/>
195
                <label for="[% itemtype.ccl FILTER remove(',') %]-[% itemtype.number %]">[% UNLESS ( noItemTypeImages ) %][% IF ( itemtype.imageurl ) %]<img border="0" src="[% itemtype.imageurl %]" alt="[% itemtype.description %]" />[% END %]&nbsp;[% END %]
196
                [% itemtype.description %]</label>
197
                </td>
198
            [% END %]
199
            [% IF ( loop.last ) %]</tr>
200
            [% ELSE %][% UNLESS ( count % 5 ) %]</tr><tr>[% END %]
201
            [% END %]
202
        [% END %]
195
    </table>
203
    </table>
196
    </fieldset>
204
    </fieldset>
197
    </div>
205
    </div>
(-)a/opac/opac-search.pl (-5 / +22 lines)
Lines 95-111 my $lang = C4::Templates::getlanguage($cgi, 'opac'); Link Here
95
my $template_name;
95
my $template_name;
96
my $template_type = 'basic';
96
my $template_type = 'basic';
97
my @params = $cgi->param("limit");
97
my @params = $cgi->param("limit");
98
98
my @searchCategories = $cgi->param('searchcat');
99
99
100
my $format = $cgi->param("format") || '';
100
my $format = $cgi->param("format") || '';
101
my $build_grouped_results = C4::Context->preference('OPACGroupResults');
101
my $build_grouped_results = C4::Context->preference('OPACGroupResults');
102
if ($format =~ /(rss|atom|opensearchdescription)/) {
102
if ($format =~ /(rss|atom|opensearchdescription)/) {
103
    $template_name = 'opac-opensearch.tmpl';
103
    $template_name = 'opac-opensearch.tmpl';
104
}
104
}
105
elsif (@params && $build_grouped_results) {
105
elsif ((@params || @searchCategories) && $build_grouped_results) {
106
    $template_name = 'opac-results-grouped.tmpl';
106
    $template_name = 'opac-results-grouped.tmpl';
107
}
107
}
108
elsif ((@params>=1) || ($cgi->param("q")) || ($cgi->param('multibranchlimit')) || ($cgi->param('limit-yr')) ) {
108
elsif (((@params>=1) || (@searchCategories>=1)) || ($cgi->param("q")) || ($cgi->param('multibranchlimit')) || ($cgi->param('limit-yr')) ) {
109
    $template_name = 'opac-results.tmpl';
109
    $template_name = 'opac-results.tmpl';
110
}
110
}
111
else {
111
else {
Lines 202-208 my $languages_limit_loop = getAllLanguages($lang); Link Here
202
$template->param(search_languages_loop => $languages_limit_loop,);
202
$template->param(search_languages_loop => $languages_limit_loop,);
203
203
204
# load the Type stuff
204
# load the Type stuff
205
my $itemtypes = GetItemTypes;
205
my $itemtypes = GetItemTypesCategorized;
206
# the index parameter is different for item-level itemtypes
206
# the index parameter is different for item-level itemtypes
207
my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype';
207
my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype';
208
my @advancedsearchesloop;
208
my @advancedsearchesloop;
Lines 220-227 foreach my $advanced_srch_type (@advanced_search_types) { Link Here
220
                code => $thisitemtype,
220
                code => $thisitemtype,
221
                description => $itemtypes->{$thisitemtype}->{'description'},
221
                description => $itemtypes->{$thisitemtype}->{'description'},
222
                imageurl=> getitemtypeimagelocation( 'opac', $itemtypes->{$thisitemtype}->{'imageurl'} ),
222
                imageurl=> getitemtypeimagelocation( 'opac', $itemtypes->{$thisitemtype}->{'imageurl'} ),
223
                cat => $itemtypes->{$thisitemtype}->{'iscat'},
224
                hideinopac => $itemtypes->{$thisitemtype}->{'hideinopac'},
225
                searchcategory => $itemtypes->{$thisitemtype}->{'searchcategory'},
223
            );
226
            );
227
      if ( !$itemtypes->{$thisitemtype}->{'hideinopac'} ) {
224
	    push @itypesloop, \%row;
228
	    push @itypesloop, \%row;
229
      }
225
	}
230
	}
226
        my %search_code = (  advanced_search_type => $advanced_srch_type,
231
        my %search_code = (  advanced_search_type => $advanced_srch_type,
227
                             code_loop => \@itypesloop );
232
                             code_loop => \@itypesloop );
Lines 236-241 foreach my $advanced_srch_type (@advanced_search_types) { Link Here
236
				ccl => $advanced_srch_type,
241
				ccl => $advanced_srch_type,
237
                code => $thisitemtype->{authorised_value},
242
                code => $thisitemtype->{authorised_value},
238
                description => $thisitemtype->{'lib_opac'} || $thisitemtype->{'lib'},
243
                description => $thisitemtype->{'lib_opac'} || $thisitemtype->{'lib'},
244
		        searchcategory => $itemtypes->{$thisitemtype}->{'searchcategory'},
239
                imageurl => getitemtypeimagelocation( 'opac', $thisitemtype->{'imageurl'} ),
245
                imageurl => getitemtypeimagelocation( 'opac', $thisitemtype->{'imageurl'} ),
240
                );
246
                );
241
		push @authvalueloop, \%row;
247
		push @authvalueloop, \%row;
Lines 400-405 if ($operands[0] && !$operands[1]) { Link Here
400
406
401
# limits are use to limit to results to a pre-defined category such as branch or language
407
# limits are use to limit to results to a pre-defined category such as branch or language
402
my @limits = $cgi->param('limit');
408
my @limits = $cgi->param('limit');
409
410
if (@searchCategories > 0) {
411
	my @tabcat;
412
    foreach my $typecategory (@searchCategories) {
413
        push (@tabcat, GetItemTypesByCategory($typecategory));
414
    }
415
416
    foreach my $itemtypeInCategory (@tabcat) {
417
        push (@limits, "mc-$itype_or_itemtype,phr:".$itemtypeInCategory);
418
    }
419
}
420
403
@limits = map { uri_unescape($_) } @limits;
421
@limits = map { uri_unescape($_) } @limits;
404
422
405
if($params->{'multibranchlimit'}) {
423
if($params->{'multibranchlimit'}) {
406
- 

Return to bug 10937