[Koha-patches] [PATCH] Kohabug 2500 Fiction Call Number Splitting Enhancement/Bugfix
Joe Atzberger
joe.atzberger at liblime.com
Thu Mar 5 16:38:25 CET 2009
More than this minor change, this function needs complete documentation and
test cases to establish what it is *trying* to do, and that it does it
correctly.
---joe
On Thu, Feb 26, 2009 at 3:43 PM, Chris Nighswonger <
cnighswonger at foundations.edu> wrote:
> The current regexp used to split fiction call numbers does not handle the
> '.' char well. This patch corrects the regexp so that it behaves as
> expected.
>
> This patch should be ported to the 3.0.x branch.
>
> [fbcbug 5]
> ---
> C4/Labels.pm | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/C4/Labels.pm b/C4/Labels.pm
> index 65c62a7..3a21bbd 100644
> --- a/C4/Labels.pm
> +++ b/C4/Labels.pm
> @@ -994,7 +994,7 @@ sub split_fcn {
> # Split fiction call numbers based on spaces
> SPLIT_FCN:
> while ($fcn) {
> - if ($fcn =~ m/([A-Za-z0-9]+)(\W?).*?/x) {
> + if ($fcn =~ m/([A-Za-z0-9]+\.?[0-9]?)(\W?).*?/x) {
> push (@fcn_split, $1);
> $fcn = $';
> }
> --
> 1.5.6.5
>
> _______________________________________________
> Koha-patches mailing list
> Koha-patches at lists.koha.org
> http://lists.koha.org/mailman/listinfo/koha-patches
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-patches/attachments/20090305/3a6e6f23/attachment-0002.htm>
More information about the Koha-patches
mailing list