Bug 22657: (QA follow-up) Restore previous version of regex
authorOwen Leonard <oleonard@myacpl.org>
Thu, 9 May 2019 17:52:26 +0000 (17:52 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Wed, 15 May 2019 16:58:50 +0000 (16:58 +0000)
This patch restores the previous version of the regular expression which
parses the OPACSuggestionMandatoryFields system preference value.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

opac/opac-suggestions.pl

index 1d11d75..8f792cd 100755 (executable)
@@ -212,7 +212,7 @@ my @mandatoryfields;
 {
     last unless ($op eq 'add');
     my $fldsreq_sp = C4::Context->preference("OPACSuggestionMandatoryFields") || 'title';
-    @mandatoryfields = split( ",", $fldsreq_sp );
+    @mandatoryfields = sort split(/\s*\,\s*/, $fldsreq_sp);
     foreach (@mandatoryfields) {
         $template->param( $_."_required" => 1);
     }