[Koha-bugs] [Bug 7567] News by Library: refactor, enhance, and fix

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Dec 11 23:28:58 CET 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7567

--- Comment #25 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Comment on attachment 23386
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23386
Bug 7567 - News by Branch

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

Hi Mark,

I did a quick code review - noted some things using splinter review below.
Could you please take a look?

::: C4/NewsChannels.pm
@@ +124,5 @@
>      $data->{$data->{'lang'}} = 1 if defined $data->{lang};
>      $data->{expirationdate} = format_date($data->{expirationdate});
>      $data->{timestamp}      = format_date($data->{timestamp});
> +    if (!defined($data->{branchcode}) || $data->{branchcode} eq '') {
> +        $data->{branchname}     = "All Branches";

Suspecting a translation problem here.

@@ +166,5 @@
>      while (my $row = $sth->fetchrow_hashref) {
>          if ((($limit) && ($count < $limit)) || (!$limit)) {
>              $row->{'newdate'} = format_date($row->{'newdate'});
>              $row->{'expirationdate'} = format_date($row->{'expirationdate'});
> +            $row->{'branchname'}     = "All Branches" if !$row->{'branchcode'};

And here.

::: installer/data/mysql/en/optional/sample_news.sql
@@ +1,1 @@
> +INSERT INTO `opac_news` ( title,             new,

Please also correct translated installers to avoid problems when installing
Koha in other languages.

::: installer/data/mysql/updatedatabase.pl
@@ +7826,5 @@
>  
> +$DBversion = "3.15.00.XXX";
> +if ( CheckVersion($DBversion) ) {
> +    $dbh->do(q{
> +        ALTER TABLE opac_news ADD branchcode varchar(10) NULL DEFAULT NULL,

Please make sure that the new column is added at the same position than it is
in kohastructure.sql (using AFTER should work).

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list