[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.8.8-530-g665eeb5

Jesse Vincent jesse at bestpractical.com
Tue Aug 24 14:05:50 EDT 2010


The branch, 3.9-trunk has been updated
       via  665eeb51fd79abf4e4c4fac25080c46860074de3 (commit)
      from  21079ecce0ba186410219dd8cc73451272fa64a2 (commit)

Summary of changes:
 etc/RT_Config.pm.in |   18 ++++++++++++++++++
 lib/RT/Record.pm    |   11 ++---------
 2 files changed, 20 insertions(+), 9 deletions(-)

- Log -----------------------------------------------------------------
commit 665eeb51fd79abf4e4c4fac25080c46860074de3
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Aug 24 13:38:15 2010 -0400

    Replace hardcoded evals for our record baseclass with a config file frob

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index ee90902..473b3b1 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -2190,6 +2190,24 @@ production:
 Set($DevelMode, '@RT_DEVEL_MODE@');
 
 
+=item C<$RecordBaseClass>
+
+What abstract base class should RT use for its records. You should never change this.
+
+Valid values are 
+
+=over 
+
+=item DBIx::SearchBuilder::Record
+
+=item DBIx::SearchBuilder::Record::Cachable
+
+=back
+
+=cut
+
+Set($RecordBaseClass, 'DBIx::SearchBuilder::Record::Cachable');
+
 =back
 
 =head1 Deprecated Options
diff --git a/lib/RT/Record.pm b/lib/RT/Record.pm
index 691c190..02bf588 100755
--- a/lib/RT/Record.pm
+++ b/lib/RT/Record.pm
@@ -72,15 +72,8 @@ use RT::Attributes;
 use Encode qw();
 
 our $_TABLE_ATTR = { };
-
-use RT::Base;
-my $base = 'DBIx::SearchBuilder::Record::Cachable';
-if ( $RT::Config && $RT::Config->Get('DontCacheSearchBuilderRecords') ) {
-    $base = 'DBIx::SearchBuilder::Record';
-}
-eval "require $base" or die $@;
-our @ISA = 'RT::Base';
-push @ISA, $base;
+use base RT->Config->Get('RecordBaseClass');
+use base 'RT::Base';
 
 # {{{ sub _Init 
 

-----------------------------------------------------------------------


More information about the Rt-commit mailing list