From d44b69e8428b9e3d6fce7e1d25a25615636ec96c Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Thu, 25 Sep 2014 15:35:54 -0400 Subject: [PATCH] Use split instead of regex, and only one flag Signed-off-by: Mike Rylander --- Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm index a09b2dc793..526722f2c0 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm @@ -36,7 +36,7 @@ my $U = 'OpenILS::Application::AppUtils'; # set the bootstrap config when this module is loaded my ($bootstrap, $supercat, $actor, $parser, $search, $xslt, $cn_browse_xslt, %browse_types, %qualifier_map); -my $authority_axis_re = qr/^authority\.(\w+)(\.refs)?(\.search)?$/; +my $authority_axis_re = qr/^authority\.(\w+)(\.refs)?$/; my %extra_header_action_per_type = ( marc21 => [ @@ -1640,13 +1640,13 @@ sub string_browse { my $tree; if ($axis =~ /^authority/) { - my ($realaxis, $refs, $search_flag) = ($axis =~ $authority_axis_re); + my (undef, $realaxis, $search_flag) = split /\./, $axis; - my $how = 'browse_center'; - $how = 'search_rank' if $search_flag; + my $how = 'browse_center'; + $how = 'search_rank' if ($search_flag eq 'search'); my $method = "open-ils.supercat.authority.$how.by_axis"; - $method .= ".refs" if $refs or $search_flag; + $method .= ".refs" if $search_flag; $tree = $supercat->request( $method, -- 2.11.0