[Rt-commit] r19496 - in rt/3.999/trunk: . lib/RT lib/RT/Test
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Thu May 7 03:01:49 EDT 2009
Author: sunnavy
Date: Thu May 7 03:01:49 2009
New Revision: 19496
Modified:
rt/3.999/trunk/ (props changed)
rt/3.999/trunk/lib/RT/Bootstrap.pm
rt/3.999/trunk/lib/RT/Model/AttachmentCollection.pm
rt/3.999/trunk/lib/RT/Model/TicketCollection.pm
rt/3.999/trunk/lib/RT/Test.pm
rt/3.999/trunk/lib/RT/Test/Shredder.pm
Log:
r20336 at sunnavys-mb (orig r18799): sunnavy | 2009-03-15 13:41:49 +0800
database stuff lives in jifty's config, not in rt's any more
Modified: rt/3.999/trunk/lib/RT/Bootstrap.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/Bootstrap.pm (original)
+++ rt/3.999/trunk/lib/RT/Bootstrap.pm Thu May 7 03:01:49 2009
@@ -71,14 +71,6 @@
'custom_field_values_sources' => [],
'dashboard_address' => '',
'dashboard_subject' => '%s Dashboard: %s',
- 'database_host' => 'localhost',
- 'database_name' => 'rt3',
- 'database_password' => 'rt_pass',
- 'database_port' => '',
- 'database_require_ssl' => undef,
- 'database_rt_host' => 'localhost',
- 'database_type' => 'SQLite',
- 'database_user' => 'rt_user',
'date_day_before_month' => 1,
'date_time_format' => '%Y-%m-%d %H:%M:%S',
'default_queue' => 'General',
@@ -642,8 +634,6 @@
}
}
- my $db_type = RT->config->get('DatabaseType');
-
#print "Done setting up database content.\n";
}
Modified: rt/3.999/trunk/lib/RT/Model/AttachmentCollection.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/Model/AttachmentCollection.pm (original)
+++ rt/3.999/trunk/lib/RT/Model/AttachmentCollection.pm Thu May 7 03:01:49 2009
@@ -135,7 +135,7 @@
);
# http://rt3.fsck.com/Ticket/Display.html?id=12483
- if ( RT->config->get('DatabaseType') ne 'Oracle' ) {
+ if ( Jifty->config->framework('Database')->{'Driver'} ne 'Oracle' ) {
$self->limit(
entry_aggregator => 'AND',
column => 'content',
Modified: rt/3.999/trunk/lib/RT/Model/TicketCollection.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/Model/TicketCollection.pm (original)
+++ rt/3.999/trunk/lib/RT/Model/TicketCollection.pm Thu May 7 03:01:49 2009
@@ -1385,7 +1385,7 @@
my $null_columns_ok;
my $fix_op = sub {
my $op = shift;
- return $op unless RT->config->get('DatabaseType') eq 'Oracle';
+ return $op unless Jifty->config->framework('Database')->{'Driver'} eq 'Oracle';
return 'MATCHES' if $op eq '=';
return 'NOT MATCHES' if $op eq '!=';
return $op;
Modified: rt/3.999/trunk/lib/RT/Test.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/Test.pm (original)
+++ rt/3.999/trunk/lib/RT/Test.pm Thu May 7 03:01:49 2009
@@ -558,7 +558,7 @@
sub db_requires_no_dba {
my $self = shift;
- my $db_type = RT->config->get('DatabaseType');
+ my $db_type = Jifty->config->framework('Database')->{'Driver'};
return 1 if $db_type eq 'SQLite';
}
Modified: rt/3.999/trunk/lib/RT/Test/Shredder.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/Test/Shredder.pm (original)
+++ rt/3.999/trunk/lib/RT/Test/Shredder.pm Thu May 7 03:01:49 2009
@@ -69,16 +69,22 @@
sub rewrite_rtconfig {
# database
- config_set( '$DatabaseType', 'SQLite' );
- config_set( '$DatabaseHost', 'localhost' );
- config_set( '$DatabaseRTHost', 'localhost' );
- config_set( '$DatabasePort', '' );
- config_set( '$DatabaseUser', 'rt_user' );
- config_set( '$Databasepassword', 'rt_pass' );
- config_set( '$DatabaseRequireSSL', undef );
+# config_set( 'DatabaseType', 'SQLite' );
+# config_set( 'DatabaseHost', 'localhost' );
+# config_set( 'DatabaseRTHost', 'localhost' );
+# config_set( 'DatabasePort', '' );
+# config_set( 'DatabaseUser', 'rt_user' );
+# config_set( 'Databasepassword', 'rt_pass' );
+# config_set( 'DatabaseRequireSSL', undef );
+#
+# # database file name
+# config_set( 'DatabaseName', db_name() );
+ Jifty->config->{'framework'}{'Database'}{'Driver'} = 'SQLite';
+ Jifty->config->{'framework'}{'Database'}{'Host'} = 'localhost';
+ Jifty->config->{'framework'}{'Database'}{'Port'} = 'SQLite';
+ Jifty->config->{'framework'}{'Database'}{'User'} = 'rt_user';
+ Jifty->config->{'framework'}{'Database'}{'Password'} = 'rt_pass';
- # database file name
- config_set( '$Databasename', db_name() );
# generic logging
config_set( '$LogStackTraces', 'crit' );
@@ -90,7 +96,6 @@
sub config_set {
my $opt = shift;
- $opt =~ s/^[\$\%\@]//;
RT->config->set( $opt, @_ );
}
More information about the Rt-commit
mailing list