]> git.imager.perl.org - bse.git/blobdiff - site/cgi-bin/modules/BSE/Index/BSE.pm
consistently load the managed images directory from the config file
[bse.git] / site / cgi-bin / modules / BSE / Index / BSE.pm
index 0de50055c62776fce4be7d30ee48e2474df3faf3..1b9497d4dea26c24df95bf47656b5377c2c2d4c8 100644 (file)
@@ -2,9 +2,10 @@ package BSE::Index::BSE;
 use strict;
 use base 'BSE::Index::Base';
 use BSE::DB;
-use Constants qw($DATADIR $MAXPHRASE);
+use Constants qw($MAXPHRASE);
+use BSE::CfgInfo qw(cfg_data_dir);
 
-our $VERSION = "1.001";
+our $VERSION = "1.002";
 
 sub new {
   my ($class, %opts) = @_;
@@ -50,7 +51,8 @@ sub new {
 sub start_index {
   my $self = shift;
 
-  my $stopwords = "$DATADIR/stopwords.txt";
+  my $data_dir = cfg_data_dir();
+  my $stopwords = "$data_dir/stopwords.txt";
 
   # load the stop words
   open STOP, "< $stopwords"