Bug 31378: Rename Auth Provider to Identity Provider and add Client.t tests
[koha-ffzg.git] / C4 / Koha.pm
index c08ee6a..89376b0 100644 (file)
@@ -30,36 +30,35 @@ use Koha::MarcSubfieldStructures;
 use Business::ISBN;
 use Business::ISSN;
 use autouse 'Data::cselectall_arrayref' => qw(Dumper);
-use vars qw(@ISA @EXPORT @EXPORT_OK $DEBUG);
 
+our (@ISA, @EXPORT_OK);
 BEGIN {
-       require Exporter;
-       @ISA    = qw(Exporter);
-       @EXPORT = qw(
-        &GetItemTypesCategorized
-        &getallthemes
-        &getFacets
-        &getnbpages
-               &getitemtypeimagedir
-               &getitemtypeimagesrc
-               &getitemtypeimagelocation
-               &GetAuthorisedValues
-               &GetNormalizedUPC
-               &GetNormalizedISBN
-               &GetNormalizedEAN
-               &GetNormalizedOCLCNumber
-        &xml_escape
-
-        &GetVariationsOfISBN
-        &GetVariationsOfISBNs
-        &NormalizeISBN
-        &GetVariationsOfISSN
-        &GetVariationsOfISSNs
-        &NormalizeISSN
-
-               $DEBUG
-       );
-       $DEBUG = 0;
+    require Exporter;
+    @ISA       = qw(Exporter);
+    @EXPORT_OK = qw(
+      GetItemTypesCategorized
+      getallthemes
+      getFacets
+      getImageSets
+      getnbpages
+      getitemtypeimagedir
+      getitemtypeimagesrc
+      getitemtypeimagelocation
+      GetAuthorisedValues
+      GetNormalizedUPC
+      GetNormalizedISBN
+      GetNormalizedEAN
+      GetNormalizedOCLCNumber
+      xml_escape
+
+      GetVariationsOfISBN
+      GetVariationsOfISBNs
+      NormalizeISBN
+      GetVariationsOfISSN
+      GetVariationsOfISSNs
+      NormalizeISSN
+
+    );
 }
 
 =head1 NAME
@@ -249,7 +248,6 @@ sub getImageSets {
     my @imagesets = (); # list of hasrefs of image set data to pass to template
     my @subdirectories = _getSubdirectoryNames( $paths->{'staff'}{'filesystem'} );
     foreach my $imagesubdir ( @subdirectories ) {
-    warn $imagesubdir if $DEBUG;
         my @imagelist     = (); # hashrefs of image info
         my @imagenames = _getImagesFromDirectory( File::Spec->catfile( $paths->{'staff'}{'filesystem'}, $imagesubdir ) );
         my $imagesetactive = 0;
@@ -484,10 +482,10 @@ C<$opac> If set to a true value, displays OPAC descriptions rather than normal o
 =cut
 
 sub GetAuthorisedValues {
-    my ( $category, $opac ) = @_;
+    my $category = shift // '';  # optional parameter
+    my $opac = shift ? 1 : 0;  # normalise to be safe
 
     # Is this cached already?
-    $opac = $opac ? 1 : 0;    # normalise to be safe
     my $branch_limit =
       C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
     my $cache_key =