[Koha-cvs] CVS: koha/C4 Context.pm,1.5,1.6

Andrew Arensburger arensb at users.sourceforge.net
Thu Oct 3 18:15:16 CEST 2002


Update of /cvsroot/koha/koha/C4
In directory usw-pr-cvs1:/tmp/cvs-serv26626a

Modified Files:
	Context.pm 
Log Message:
Changed a function call to a class method call, and a few more anal
changes.


Index: Context.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Context.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** Context.pm	3 Oct 2002 11:31:31 -0000	1.5
--- Context.pm	3 Oct 2002 16:15:10 -0000	1.6
***************
*** 454,474 ****
  sub _new_stopwords
  {
! 	my $dbh = &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);
  	}
  	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);
  }
  
--- 454,466 ----
  sub _new_stopwords
  {
! 	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);
  	}
  	return $stopwordlist;
  }
  





More information about the Koha-cvs mailing list