Changed a function call to a class method call, and a few more anal
authorarensb <arensb>
Thu, 3 Oct 2002 16:15:10 +0000 (16:15 +0000)
committerarensb <arensb>
Thu, 3 Oct 2002 16:15:10 +0000 (16:15 +0000)
changes.

C4/Context.pm

index 7932c2e..04ab904 100644 (file)
@@ -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;