From bfa7640da7f65e34c28ed0d7b1ddde2bd905709b Mon Sep 17 00:00:00 2001 From: tipaul Date: Mon, 1 Aug 2005 15:34:49 +0000 Subject: [PATCH] adding a warning to librarian if there is no stopwords --- admin-home.pl | 5 +++++ .../intranet-tmpl/default/en/parameters/admin-home.tmpl | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/admin-home.pl b/admin-home.pl index 30b1dec4ef..e46409c7f9 100755 --- a/admin-home.pl +++ b/admin-home.pl @@ -17,5 +17,10 @@ my ($template, $loggedinuser, $cookie) flagsrequired => {parameters => 1, management => 1, tools => 1}, debug => 1, }); +my $dbh = C4::Context->dbh; +my $sth = $dbh->prepare("select count(*) from stopwords"); +$sth->execute; +my ($total) = $sth->fetchrow; +$template->param(stopwords => $total); output_html_with_http_headers $query, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/default/en/parameters/admin-home.tmpl b/koha-tmpl/intranet-tmpl/default/en/parameters/admin-home.tmpl index e4d23e4c5c..4fe0a234bc 100644 --- a/koha-tmpl/intranet-tmpl/default/en/parameters/admin-home.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/parameters/admin-home.tmpl @@ -86,7 +86,8 @@ Stop words - Words deleted during searches. + Words deleted during searches. +

WARNING : you should define stop words