[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.9.7-8-gbf8dde2
Alex Vandiver
alexmv at bestpractical.com
Tue Dec 7 19:45:17 EST 2010
The branch, 3.9-trunk has been updated
via bf8dde237b10a31c2b689d45a77d8df02279c18d (commit)
via b118b4f11de7677ff7117f81069c46451c31a510 (commit)
via f5f1aa7d4c30494a317827e671881ea2898b9a46 (commit)
from d76fd32ba297e69c17f6c6e64c5e3f8f09acc35b (commit)
Summary of changes:
lib/RT/SQL.pm | 2 +-
lib/RT/Search/Googleish.pm | 2 +-
share/html/Elements/CollectionList | 3 ++-
share/html/Search/Results.html | 1 +
4 files changed, 5 insertions(+), 3 deletions(-)
- Log -----------------------------------------------------------------
commit f5f1aa7d4c30494a317827e671881ea2898b9a46
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue Dec 7 18:57:50 2010 -0500
Pass through the result of CountAll, so we don't call that twice per ticket list
diff --git a/share/html/Elements/CollectionList b/share/html/Elements/CollectionList
index 452b1e5..ba954ef 100644
--- a/share/html/Elements/CollectionList
+++ b/share/html/Elements/CollectionList
@@ -51,7 +51,7 @@ if (!$Collection && $Class eq 'RT::Tickets') {
$Collection->FromSQL($Query);
}
-my $TotalFound = $Collection->CountAll();
+$TotalFound = $Collection->CountAll() unless defined $TotalFound;
return '' if !$TotalFound && !$ShowEmpty;
if ( $Rows ) {
@@ -183,6 +183,7 @@ if ( $Rows && $ShowNavigation && $TotalFound > $Rows ) {
<%ARGS>
$Class => ''
$Collection => undef
+$TotalFound => undef
$Format => undef
$DisplayFormat => undef
@Order => ()
diff --git a/share/html/Search/Results.html b/share/html/Search/Results.html
index e4a9863..cb7bce9 100755
--- a/share/html/Search/Results.html
+++ b/share/html/Search/Results.html
@@ -51,6 +51,7 @@
<& /Elements/Tabs &>
<& /Elements/CollectionList,
Query => $Query,
+ TotalFound => $ticketcount,
AllowSorting => 1,
OrderBy => $OrderBy,
Order => $Order,
commit b118b4f11de7677ff7117f81069c46451c31a510
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue Dec 7 19:30:40 2010 -0500
Support ENDSWITH and STARTSWITH
diff --git a/lib/RT/SQL.pm b/lib/RT/SQL.pm
index 45a5b61..df72567 100644
--- a/lib/RT/SQL.pm
+++ b/lib/RT/SQL.pm
@@ -70,7 +70,7 @@ my $re_aggreg = qr[(?i:AND|OR)];
my $re_delim = qr[$RE{delimited}{-delim=>qq{\'\"}}];
my $re_value = qr[[+-]?\d+|NULL|$re_delim];
my $re_keyword = qr[[{}\w\.]+|$re_delim];
-my $re_op = qr[=|!=|>=|<=|>|<|(?i:IS NOT)|(?i:IS)|(?i:NOT LIKE)|(?i:LIKE)]; # long to short
+my $re_op = qr[=|!=|>=|<=|>|<|(?i:IS NOT)|(?i:IS)|(?i:NOT LIKE)|(?i:LIKE)|(?i:NOT STARTSWITH)|(?i:STARTSWITH)|(?i:NOT ENDSWITH)|(?i:ENDSWITH)]; # long to short
my $re_open_paren = qr[\(];
my $re_close_paren = qr[\)];
commit bf8dde237b10a31c2b689d45a77d8df02279c18d
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue Dec 7 19:01:15 2010 -0500
Requestor searches now match STARTSWITH, for better indexing
diff --git a/lib/RT/Search/Googleish.pm b/lib/RT/Search/Googleish.pm
index 6356059..598b949 100644
--- a/lib/RT/Search/Googleish.pm
+++ b/lib/RT/Search/Googleish.pm
@@ -243,7 +243,7 @@ sub HandleOwner {
sub HandleWatcher {
return watcher => (!$_[2] and $_[1] eq "me") ? "Watcher.id = '__CurrentUser__'" : "Watcher = '$_[1]'";
}
-sub HandleRequestor { return requestor => "Requestor LIKE '$_[1]'"; }
+sub HandleRequestor { return requestor => "Requestor STARTSWITH '$_[1]'"; }
sub HandleQueue { return queue => "Queue = '$_[1]'"; }
sub HandleQ { return queue => "Queue = '$_[1]'"; }
sub HandleCf { return "cf.$_[3]" => "CF.'$_[3]' LIKE '$_[1]'"; }
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list