Bug 10426: Remove unused sub GetCcodes from Koha.pm
authorColin Campbell <colin.campbell@ptfs-europe.com>
Thu, 6 Jun 2013 10:42:24 +0000 (11:42 +0100)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 6 Sep 2013 18:27:16 +0000 (18:27 +0000)
Remove uncalled sub GetCcodes

Also remove comment in opac-search.pl which is
remaining reference to it and serves no
useful purpose

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>

C4/Koha.pm
opac/opac-search.pl

index 8429eac..c5b32a6 100644 (file)
@@ -41,7 +41,6 @@ BEGIN {
                &subfield_is_koha_internal_p
                &GetPrinters &GetPrinter
                &GetItemTypes &getitemtypeinfo
-               &GetCcodes
                &GetSupportName &GetSupportList
                &get_itemtypeinfos_of
                &getframeworks &getframeworkinfo
@@ -286,27 +285,6 @@ END_SQL
     return get_infos_of( $query, 'itemtype', undef, \@itemtypes );
 }
 
-# this is temporary until we separate collection codes and item types
-sub GetCcodes {
-    my $count = 0;
-    my @results;
-    my $dbh = C4::Context->dbh;
-    my $sth =
-      $dbh->prepare(
-        "SELECT * FROM authorised_values ORDER BY authorised_value");
-    $sth->execute;
-    while ( my $data = $sth->fetchrow_hashref ) {
-        if ( $data->{category} eq "CCODE" ) {
-            $count++;
-            $results[$count] = $data;
-
-            #warn "data: $data";
-        }
-    }
-    $sth->finish;
-    return ( $count, @results );
-}
-
 =head2 getauthtypes
 
   $authtypes = &getauthtypes();
index 7d2b7a6..76f4fda 100755 (executable)
@@ -246,10 +246,6 @@ foreach my $advanced_srch_type (@advanced_search_types) {
 }
 $template->param(advancedsearchesloop => \@advancedsearchesloop);
 
-# # load the itypes (Called item types in the template -- just authorized values for searching)
-# my ($itypecount,@itype_loop) = GetCcodes();
-# $template->param(itypeloop=>\@itype_loop,);
-
 # The following should only be loaded if we're bringing up the advanced search template
 if ( $template_type && $template_type eq 'advsearch' ) {
     # load the servers (used for searching -- to do federated searching, etc.)