unconditional warning changed to if $DEBUG
authorPaul Poulain <paul.poulain@biblibre.com>
Fri, 26 Mar 2010 10:25:32 +0000 (11:25 +0100)
committerGalen Charlton <gmcharlt@gmail.com>
Fri, 23 Apr 2010 11:03:24 +0000 (07:03 -0400)
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
C4/Search.pm

index 554174c..1161223 100644 (file)
@@ -2607,7 +2607,7 @@ sub GetDistinctValues {
     if ($fieldname=~/\./){
                        my ($table,$column)=split /\./, $fieldname;
                        my $dbh = C4::Context->dbh;
-                       warn "select DISTINCT($column) as value, count(*) as cnt from $table group by lib order by $column ";
+                       warn "select DISTINCT($column) as value, count(*) as cnt from $table group by lib order by $column " if $DEBUG;
                        my $sth = $dbh->prepare("select DISTINCT($column) as value, count(*) as cnt from $table ".($string?" where $column like \"$string%\"":"")."group by value order by $column ");
                        $sth->execute;
                        my $elements=$sth->fetchall_arrayref({});