[Rt-commit] r3474 - in rtfm/branches/2.1-TESTING: .
html/RTFM/Article lib/RT/FM
alexmv at bestpractical.com
alexmv at bestpractical.com
Thu Jul 14 17:32:02 EDT 2005
Author: alexmv
Date: Thu Jul 14 17:32:02 2005
New Revision: 3474
Modified:
rtfm/branches/2.1-TESTING/ (props changed)
rtfm/branches/2.1-TESTING/html/RTFM/Article/Search.html
rtfm/branches/2.1-TESTING/lib/RT/FM/ArticleCollection_Overlay.pm
Log:
r5072 at zoq-fot-pik: chmrr | 2005-07-14 17:32:23 -0400
* Make "search everything" actually do that
Modified: rtfm/branches/2.1-TESTING/html/RTFM/Article/Search.html
==============================================================================
--- rtfm/branches/2.1-TESTING/html/RTFM/Article/Search.html (original)
+++ rtfm/branches/2.1-TESTING/html/RTFM/Article/Search.html Thu Jul 14 17:32:02 2005
@@ -316,34 +316,37 @@
}
}
-### Searches for any custom field
+### Searches for any field
if ($ARGS{'Article~'}) {
- if (ref($ARGS{'Article~'}) eq 'ARRAY') {
- my @Match = @{$ARGS{'Article~'}};
- foreach my $value (@Match) {
- $articles->LimitCustomField( VALUE => $value,
- ENTRYAGGREGATOR => 'OR',
- OPERATOR => 'LIKE' );
- }
- } else {
- $articles->LimitCustomField( VALUE => $ARGS{'Article~'},
- OPERATOR => 'LIKE' );
- }
+ $articles->LimitCustomField( VALUE => $ARGS{'Article~'},
+ ENTRYAGGREGATOR => 'OR',
+ OPERATOR => 'LIKE' );
+ $articles->Limit( SUBCLAUSE => "ObjectCustomFieldValues_1.Content",
+ FIELD => "Name",
+ VALUE => $ARGS{'Article~'},
+ ENTRYAGGREGATOR => 'OR',
+ OPERATOR => 'LIKE' );
+ $articles->Limit( SUBCLAUSE => "ObjectCustomFieldValues_1.Content",
+ FIELD => "Summary",
+ VALUE => $ARGS{'Article~'},
+ ENTRYAGGREGATOR => 'OR',
+ OPERATOR => 'LIKE' );
}
if ($ARGS{'Article!~'}) {
- if (ref($ARGS{'Article!~'}) eq 'ARRAY') {
- my @NoMatch = @{$ARGS{'Article!~'}};
- foreach my $value (@NoMatch) {
- $articles->LimitCustomField( VALUE => $value,
- ENTRYAGGREGATOR => 'OR',
- OPERATOR => 'NOT LIKE' );
- }
- } else {
- $articles->LimitCustomField( VALUE => $ARGS{'Article!~'},
- OPERATOR => 'NOT LIKE' );
- }
+ $articles->LimitCustomField( VALUE => $ARGS{'Article!~'},
+ OPERATOR => 'NOT LIKE' );
+ $articles->Limit( SUBCLAUSE => "ObjectCustomFieldValues_1.Content",
+ FIELD => "Name",
+ VALUE => $ARGS{'Article!~'},
+ ENTRYAGGREGATOR => 'ANT',
+ OPERATOR => 'NOT LIKE' );
+ $articles->Limit( SUBCLAUSE => "ObjectCustomFieldValues_1.Content",
+ FIELD => "Summary",
+ VALUE => $ARGS{'Article!~'},
+ ENTRYAGGREGATOR => 'AND',
+ OPERATOR => 'NOT LIKE' );
}
foreach my $field qw(Name Summary Class) {
Modified: rtfm/branches/2.1-TESTING/lib/RT/FM/ArticleCollection_Overlay.pm
==============================================================================
--- rtfm/branches/2.1-TESTING/lib/RT/FM/ArticleCollection_Overlay.pm (original)
+++ rtfm/branches/2.1-TESTING/lib/RT/FM/ArticleCollection_Overlay.pm Thu Jul 14 17:32:02 2005
@@ -228,14 +228,10 @@
ALIAS1 => 'main',
FIELD1 => 'id',
TABLE2 => 'ObjectCustomFieldValues',
- FIELD2 => 'ObjectId'
+ FIELD2 => 'ObjectId',
+ EXPRESSION => 'main.id AND Disabled = 0'
);
- # Ignore disabled values
- $self->Limit( ALIAS => $ObjectValuesAlias,
- FIELD => "Disabled",
- VALUE => "0");
-
if ( $args{'FIELD'} ) {
my $field_id;
More information about the Rt-commit
mailing list