Bugzilla – Attachment 51958 Details for
Bug 16637
Dependency for C4::Tags not listed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16637: t/00-load.t warning from C4/Tags.pm
Bug-16637-t00-loadt-warning-from-C4Tagspm.patch (text/plain), 2.36 KB, created by
Mark Tompsett
on 2016-06-02 01:32:48 UTC
(
hide
)
Description:
Bug 16637: t/00-load.t warning from C4/Tags.pm
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2016-06-02 01:32:48 UTC
Size:
2.36 KB
patch
obsolete
>From 7b16f055b68c8688e585324209f03f919b7d3227 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Wed, 1 Jun 2016 20:43:41 -0400 >Subject: [PATCH] Bug 16637: t/00-load.t warning from C4/Tags.pm > >Added optional dependency, so as to explain why testing >explodes when the Enhanced Content system preference >TagsExternalDictionary is set. > >Since INIT runs after BEGIN, moved INIT logic into BEGIN in >order to remove INIT and thus eliminate the warning. > >TEST PLAN >--------- >1) prove t/00-load.t > -- warning about INIT for C4::Tags >2) prove `git grep -l Tags | grep [.]t$` > -- should all run okay >3) apply patch >4) repeat steps 1 and 2 > -- warning should be gone, and everything else run okay >5) run koha qa test tools >--- > C4/Installer/PerlDependencies.pm | 5 +++++ > C4/Tags.pm | 15 ++++++--------- > 2 files changed, 11 insertions(+), 9 deletions(-) > >diff --git a/C4/Installer/PerlDependencies.pm b/C4/Installer/PerlDependencies.pm >index d84b51c..eded225 100644 >--- a/C4/Installer/PerlDependencies.pm >+++ b/C4/Installer/PerlDependencies.pm >@@ -802,6 +802,11 @@ our $PERL_DEPS = { > 'required' => '1', > 'min_ver' => '0.14', > }, >+ 'Lingua::Ispell' => { >+ 'usage' => 'Enhanced Content - Tagging', >+ 'required' => '0', >+ 'min_ver' => '0.07' >+ }, > }; > > 1; >diff --git a/C4/Tags.pm b/C4/Tags.pm >index 09afd78..9d5b4be 100644 >--- a/C4/Tags.pm >+++ b/C4/Tags.pm >@@ -56,10 +56,12 @@ BEGIN { > import Data::Dumper qw(:DEFAULT); > print STDERR __PACKAGE__ . " external dictionary = " . ($ext_dict||'none') . "\n"; > } >- if ($ext_dict) { >- require Lingua::Ispell; >- import Lingua::Ispell qw(spellcheck add_word_lc save_dictionary); >- } >+ if ($ext_dict) { >+ require Lingua::Ispell; >+ import Lingua::Ispell qw(spellcheck add_word_lc save_dictionary); >+ $ext_dict and $Lingua::Ispell::path = $ext_dict; >+ $debug and print STDERR "\$Lingua::Ispell::path = $Lingua::Ispell::path\n"; >+ } > } > > =head1 C4::Tags.pm - Support for user tagging of biblios. >@@ -68,11 +70,6 @@ More verose debugging messages are sent in the presence of non-zero $ENV{"DEBUG" > > =cut > >-INIT { >- $ext_dict and $Lingua::Ispell::path = $ext_dict; >- $debug and print STDERR "\$Lingua::Ispell::path = $Lingua::Ispell::path\n"; >-} >- > sub get_filters { > my $query = "SELECT * FROM tags_filters "; > my ($sth); >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16637
:
51958
|
52059
|
52060
|
52061
|
52100