[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.8.8-878-g714b08c
Jesse Vincent
jesse at bestpractical.com
Mon Sep 27 12:05:45 EDT 2010
The branch, 3.9-trunk has been updated
via 714b08cd6f0edfad3e7e4a2d8da505093b691e41 (commit)
via 4716b680607dab4484ec1f8e9f5eba121ab18ad4 (commit)
via c369f41d21410d7035632e6cec7306cb15a5ca73 (commit)
via e4e6caa9ca6adac391e76681fb48923f34153164 (commit)
from 92ff89d11038e17b69d0312e77005f0bc3d2619b (commit)
Summary of changes:
Makefile.in | 2 +-
lib/RT/Principal_Overlay.pm | 5 +++++
lib/RT/SearchBuilder.pm | 6 +-----
lib/RT/Tickets_Overlay.pm | 10 +++++++++-
4 files changed, 16 insertions(+), 7 deletions(-)
- Log -----------------------------------------------------------------
commit e4e6caa9ca6adac391e76681fb48923f34153164
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Sun Sep 26 13:26:01 2010 -0400
RT's SystemUser always has all rights. Stop requiring DB queries to
verify this. Increases test suite performance by 5%.
diff --git a/lib/RT/Principal_Overlay.pm b/lib/RT/Principal_Overlay.pm
index 4659746..9fb24c5 100755
--- a/lib/RT/Principal_Overlay.pm
+++ b/lib/RT/Principal_Overlay.pm
@@ -251,6 +251,11 @@ sub HasRight {
@_,
);
+ # RT's SystemUser always has all rights
+ if ($self->id == RT->SystemUser->id) {
+ return 1;
+ }
+
unless ( $args{'Right'} ) {
$RT::Logger->crit("HasRight called without a right");
return (undef);
commit c369f41d21410d7035632e6cec7306cb15a5ca73
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Sun Sep 26 13:47:00 2010 -0400
Extract a method to search for bookmarked tickets from the generic ID
search.
diff --git a/lib/RT/Tickets_Overlay.pm b/lib/RT/Tickets_Overlay.pm
index 814f8aa..bf05b9e 100755
--- a/lib/RT/Tickets_Overlay.pm
+++ b/lib/RT/Tickets_Overlay.pm
@@ -276,7 +276,15 @@ Handle ID field.
sub _IdLimit {
my ( $sb, $field, $op, $value, @rest ) = @_;
- return $sb->_IntLimit( $field, $op, $value, @rest ) unless $value eq '__Bookmarked__';
+ if ( $value eq '__Bookmarked__' ) {
+ return $sb->_BookmarkLimit( $field, $op, $value, @rest );
+ } else {
+ return $sb->_IntLimit( $field, $op, $value, @rest );
+ }
+}
+
+sub _BookmarkLimit {
+ my ( $sb, $field, $op, $value, @rest ) = @_;
die "Invalid operator $op for __Bookmarked__ search on $field"
unless $op =~ /^(=|!=)$/;
commit 4716b680607dab4484ec1f8e9f5eba121ab18ad4
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Sun Sep 26 13:48:47 2010 -0400
slightly optimize a minor hotpoint on any search
diff --git a/lib/RT/SearchBuilder.pm b/lib/RT/SearchBuilder.pm
index 64d1045..21102de 100755
--- a/lib/RT/SearchBuilder.pm
+++ b/lib/RT/SearchBuilder.pm
@@ -187,11 +187,7 @@ match lower(colname) agaist lc($val);
=cut
sub Limit {
- my $self = shift;
- my %args = ( CASESENSITIVE => 1,
- @_ );
-
- return $self->SUPER::Limit(%args);
+ shift->SUPER::Limit(CASESENSITIVE => 1, @_);
}
=head2 ItemsOrderBy
commit 714b08cd6f0edfad3e7e4a2d8da505093b691e41
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Mon Sep 27 12:07:26 2010 -0400
the order of --state arguments seems to matter
diff --git a/Makefile.in b/Makefile.in
index 47afd6b..4829ddc 100755
--- a/Makefile.in
+++ b/Makefile.in
@@ -380,7 +380,7 @@ test:
parallel-test: test-parallel
test-parallel:
- RT_TEST_PARALLEL=1 $(PERL) "-MApp::Prove" -e 'my $$p = App::Prove->new(); $$p->process_args("-lrj5","--state=save,slow", "t"); $$p->run()'
+ RT_TEST_PARALLEL=1 $(PERL) "-MApp::Prove" -e 'my $$p = App::Prove->new(); $$p->process_args("-lrj5","--state=slow,save", "t"); $$p->run()'
regression-install: config-install
$(PERL) -pi -e 's/Set\(\$$DatabaseName.*\);/Set\(\$$DatabaseName, "rt3regression"\);/' $(DESTDIR)$(CONFIG_FILE)
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list