Bug 22031: Add SQL::Abstract like syntax to haspermission
[koha.git] / C4 / Koha.pm
index f547fe0..a150809 100644 (file)
@@ -395,6 +395,11 @@ sub getFacets {
                 idx  => 'location',
                 label => 'Location',
                 tags        => [ qw/ 995e / ],
+            },
+            {
+                idx => 'ccode',
+                label => 'CollectionCodes',
+                tags => [ qw / 099t 955h / ],
             }
             ];
 
@@ -477,6 +482,11 @@ sub getFacets {
                 label => 'Location',
                 tags => [ qw / 952c / ],
             },
+            {
+                idx => 'ccode',
+                label => 'CollectionCodes',
+                tags => [ qw / 9528 / ],
+            }
             ];
 
             unless ( Koha::Libraries->search->count == 1 )
@@ -1002,32 +1012,6 @@ sub GetVariationsOfISSNs {
     return wantarray ? @issns : join( " | ", @issns );
 }
 
-
-=head2 IsKohaFieldLinked
-
-    my $is_linked = IsKohaFieldLinked({
-        kohafield => $kohafield,
-        frameworkcode => $frameworkcode,
-    });
-
-    Return 1 if the field is linked
-
-=cut
-
-sub IsKohaFieldLinked {
-    my ( $params ) = @_;
-    my $kohafield = $params->{kohafield};
-    my $frameworkcode = $params->{frameworkcode} || '';
-    my $dbh = C4::Context->dbh;
-    my $is_linked = $dbh->selectcol_arrayref( q|
-        SELECT COUNT(*)
-        FROM marc_subfield_structure
-        WHERE frameworkcode = ?
-        AND kohafield = ?
-    |,{}, $frameworkcode, $kohafield );
-    return $is_linked->[0];
-}
-
 1;
 
 __END__