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

(-)a/C4/Koha.pm (-22 lines)
Lines 41-47 BEGIN { Link Here
41
		&subfield_is_koha_internal_p
41
		&subfield_is_koha_internal_p
42
		&GetPrinters &GetPrinter
42
		&GetPrinters &GetPrinter
43
		&GetItemTypes &getitemtypeinfo
43
		&GetItemTypes &getitemtypeinfo
44
		&GetCcodes
45
		&GetSupportName &GetSupportList
44
		&GetSupportName &GetSupportList
46
		&get_itemtypeinfos_of
45
		&get_itemtypeinfos_of
47
		&getframeworks &getframeworkinfo
46
		&getframeworks &getframeworkinfo
Lines 286-312 END_SQL Link Here
286
    return get_infos_of( $query, 'itemtype', undef, \@itemtypes );
285
    return get_infos_of( $query, 'itemtype', undef, \@itemtypes );
287
}
286
}
288
287
289
# this is temporary until we separate collection codes and item types
290
sub GetCcodes {
291
    my $count = 0;
292
    my @results;
293
    my $dbh = C4::Context->dbh;
294
    my $sth =
295
      $dbh->prepare(
296
        "SELECT * FROM authorised_values ORDER BY authorised_value");
297
    $sth->execute;
298
    while ( my $data = $sth->fetchrow_hashref ) {
299
        if ( $data->{category} eq "CCODE" ) {
300
            $count++;
301
            $results[$count] = $data;
302
303
            #warn "data: $data";
304
        }
305
    }
306
    $sth->finish;
307
    return ( $count, @results );
308
}
309
310
=head2 getauthtypes
288
=head2 getauthtypes
311
289
312
  $authtypes = &getauthtypes();
290
  $authtypes = &getauthtypes();
(-)a/opac/opac-search.pl (-5 lines)
Lines 246-255 foreach my $advanced_srch_type (@advanced_search_types) { Link Here
246
}
246
}
247
$template->param(advancedsearchesloop => \@advancedsearchesloop);
247
$template->param(advancedsearchesloop => \@advancedsearchesloop);
248
248
249
# # load the itypes (Called item types in the template -- just authorized values for searching)
250
# my ($itypecount,@itype_loop) = GetCcodes();
251
# $template->param(itypeloop=>\@itype_loop,);
252
253
# The following should only be loaded if we're bringing up the advanced search template
249
# The following should only be loaded if we're bringing up the advanced search template
254
if ( $template_type && $template_type eq 'advsearch' ) {
250
if ( $template_type && $template_type eq 'advsearch' ) {
255
    # load the servers (used for searching -- to do federated searching, etc.)
251
    # load the servers (used for searching -- to do federated searching, etc.)
256
- 

Return to bug 10426