adding a warning to librarian if there is no stopwords

This commit is contained in:
tipaul 2005-08-01 15:34:49 +00:00
parent 4fe42a9940
commit bfa7640da7
2 changed files with 7 additions and 1 deletions

View File

@ -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;

View File

@ -86,7 +86,8 @@
<TMPL_IF name="CAN_user_management">
<tr>
<td valign="top" width="25%"><a href="/cgi-bin/koha/admin/stopwords.pl">Stop words</a></td>
<td>Words deleted during searches.</td>
<td>Words deleted during searches.
<!-- TMPL_UNLESS name="stopwords" --><p class="problem">WARNING : you should define stop words</p><!-- /TMPL_UNLESS --></td>
</tr>
</TMPL_IF>