Merge branch 'master' into WebGUI8. Merged up to 7.9.12

This commit is contained in:
Colin Kuskie 2010-08-13 12:25:19 -07:00
commit 3e8e2d452c
27 changed files with 333 additions and 77 deletions

View file

@ -382,6 +382,9 @@ sub queryIsAllowed {
my $self = shift;
my $query = shift;
# Remove all comments before checking validity
$query =~ s{/[*].*?[*]/}{}g;
my ($firstWord) = $query =~ /(\w+)/;
$firstWord = lc $firstWord;
return isIn($firstWord, split(/\s+/, lc $self->{_databaseLink}{allowedKeywords})) ? 1 : 0;