summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Search/Condition.pm
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2011-04-02 20:57:14 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2011-04-02 20:57:14 +0200
commite1c91cd842cc2193309a284b3bd49488342ca8a1 (patch)
tree5aa390a757664b0be99ca17817ed35fd4782c3b4 /Bugzilla/Search/Condition.pm
parentd5c5177f2ef698aefa8aeffaa458016583c20f79 (diff)
downloadbugzilla-e1c91cd842cc2193309a284b3bd49488342ca8a1.tar.gz
bugzilla-e1c91cd842cc2193309a284b3bd49488342ca8a1.tar.xz
Bug 647466: Allow Search.pm to take the new URL syntax for custom search
r=mkanat, a=mkanat (module owner)
Diffstat (limited to 'Bugzilla/Search/Condition.pm')
-rw-r--r--Bugzilla/Search/Condition.pm12
1 files changed, 11 insertions, 1 deletions
diff --git a/Bugzilla/Search/Condition.pm b/Bugzilla/Search/Condition.pm
index db20e7f3b..8fe05f065 100644
--- a/Bugzilla/Search/Condition.pm
+++ b/Bugzilla/Search/Condition.pm
@@ -50,7 +50,17 @@ sub translated {
sub as_string {
my ($self) = @_;
- return $self->translated->{term};
+ my $term = $self->translated->{term};
+ $term = "NOT( $term )" if $term && $self->negate;
+ return $term;
+}
+
+sub negate {
+ my ($self, $value) = @_;
+ if (@_ == 2) {
+ $self->{negate} = $value ? 1 : 0;
+ }
+ return $self->{negate};
}
###########################