From dbb94761cf89370e666835dfac26efa33732a747 Mon Sep 17 00:00:00 2001 From: arensb Date: Thu, 3 Oct 2002 16:15:10 +0000 Subject: [PATCH] Changed a function call to a class method call, and a few more anal changes. --- C4/Context.pm | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/C4/Context.pm b/C4/Context.pm index 7932c2ea0c..04ab90446b 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -453,23 +453,15 @@ sub stopwords # hash with stopwords sub _new_stopwords { - my $dbh = &dbh; + my $dbh = C4::Context->dbh; my $stopwordlist; my $sth = $dbh->prepare("select word from stopwords"); $sth->execute; while (my $stopword = $sth->fetchrow_array) { - my $retval = {}; - $stopwordlist->{$stopword} = uc($stopword); + my $retval = {}; + $stopwordlist->{$stopword} = uc($stopword); } return $stopwordlist; -# my $db_driver = $context->{"config"}{"db_scheme"} || "mysql"; -# my $db_name = $context->{"config"}{"database"}; -# my $db_host = $context->{"config"}{"hostname"}; -# my $db_user = $context->{"config"}{"user"}; -# my $db_passwd = $context->{"config"}{"pass"}; - -# return DBI->connect("DBI:$db_driver:$db_name:$db_host", -# $db_user, $db_passwd); } 1; -- 2.39.5