https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28657

--- Comment #27 from David Cook <[email protected]> ---
Comment on attachment 184061
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184061
Bug 28657: expand branches.branchip to allow for multiple ip ranges.

Review of attachment 184061:
 --> 
(https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=28657&attachment=184061)
-----------------------------------------------------------------

::: C4/Auth.pm
@@ +2474,5 @@
>  sub in_iprange {
>      my ($iprange)       = @_;
> +    my $result          = 0;
> +    # FIXME remove '*' for backwards compatibility in branchip settings
> +    $iprange            =~ s|\*||g;

Since you're changing in_iprange, you should update the unit test in t/Auth.t
accordingly. That is, you should add a test with at least one * in it. Fair
enough changing initial $result to 0. That "in_iprange" is some funky looking
code...

::: installer/data/mysql/atomicupdate/bug_28657.perl
@@ +1,3 @@
> +$DBversion = 'XXX'; # will be replaced by the RM
> +if( CheckVersion( $DBversion ) ) {
> +    $dbh->do( "ALTER TABLE `branches` MODIFY `branchip` mediumtext COLLATE 
> utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the IP address(s) for your library 
> or branch'" );

Why are you adding the collation there? From memory, I think that will make an
upgraded DB vary slightly from a new DB.

::: installer/data/mysql/kohastructure.sql
@@ +1670,4 @@
>    `branchreturnpath` longtext DEFAULT NULL COMMENT 'the email to be used as 
> Return-Path',
>    `branchurl` longtext DEFAULT NULL COMMENT 'the URL for your library or 
> branch''s website',
>    `issuing` tinyint(4) DEFAULT NULL COMMENT 'unused in Koha',
> +  `branchip` mediumtext DEFAULT NULL COMMENT 'the IP address for your 
> library or branch',

The comments in kohastructure.sql and bug_28657.perl are different. They should
be the same.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to