check for min tag length on upload
git-svn-id: http://yolanda.mister-muffin.de/svn@287 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
parent
9d7fea9515
commit
e0a88beb70
2 changed files with 12 additions and 8 deletions
|
@ -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}++;
|
||||
}
|
||||
|
|
|
@ -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 = ();
|
||||
|
|
Loading…
Reference in a new issue