diff --git a/trunk/tools/tagcloud.pl b/trunk/tools/tagcloud.pl index 9fdafdb..367b719 100755 --- a/trunk/tools/tagcloud.pl +++ b/trunk/tools/tagcloud.pl @@ -20,7 +20,7 @@ while(($subject) = $sth->fetchrow_array()) { #strip whitespaces $val =~ s/^\s*(.*?)\s*$/$1/; - if(length($val) >= 4) + if(length($val) >= 3) { %hash->{$val}++; } diff --git a/trunk/upload.pl b/trunk/upload.pl index cd7e813..0fa25e5 100644 --- a/trunk/upload.pl +++ b/trunk/upload.pl @@ -23,17 +23,21 @@ if($userinfo->{'username'}) if($query->param('2')) { - if($query->param('DC.Title')&&$query->param('DC.Subject')&&$query->param('DC.Description')) + #remove duplicates from tags + @subject = split(' ', $query->param('DC.Subject')); + @unique{ @subject } = (); + foreach $tag (keys %unique) { - #remove duplicates from tags - @subject = split(' ', $query->param('DC.Subject')); - @unique{ @subject } = (); - foreach $tag (keys %unique) + if(length($tag) >= 3) { $subject.=$tag." "; } - $page->{'uploadform'}->{'DC.Subject'} = $subject; - + } + $subject =~ s/\s*$//; + $page->{'uploadform'}->{'DC.Subject'} = $subject; + + if($query->param('DC.Title')&&$query->param('DC.Subject')&&$query->param('DC.Description')) + { $page->{'innerresults'} = ['']; my @args = ();