diff options
author | ivan <ivan> | 2004-03-11 02:05:38 +0000 |
---|---|---|
committer | ivan <ivan> | 2004-03-11 02:05:38 +0000 |
commit | 289340780927b5bac2c7604d7317c3063c6dd8cc (patch) | |
tree | c4100ab9857ae00c330213af8a46e66c208580e6 /rt/lib/RT.pm.in | |
parent | 945721f48f74d5cfffef7c7cf3a3d6bc2521f5dd (diff) |
import of rt 3.0.9RT_3_0_9
Diffstat (limited to 'rt/lib/RT.pm.in')
-rw-r--r-- | rt/lib/RT.pm.in | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/rt/lib/RT.pm.in b/rt/lib/RT.pm.in index 065734e..14c0d47 100644 --- a/rt/lib/RT.pm.in +++ b/rt/lib/RT.pm.in @@ -117,13 +117,10 @@ sub LoadConfig { =cut sub Init { - require RT::Handle; + #Get a database connection - unless ($Handle && $Handle->dbh->ping) { - $Handle = RT::Handle->new(); - } - $Handle->Connect(); - + ConnectToDatabase(); + #RT's system user is a genuine database user. its id lives here $SystemUser = new RT::CurrentUser(); $SystemUser->LoadByName('RT_System'); @@ -137,6 +134,21 @@ sub Init { InitLogging(); } + +=head2 ConnectToDatabase + +Get a database connection + +=cut + +sub ConnectToDatabase { + require RT::Handle; + unless ($Handle && $Handle->dbh && $Handle->dbh->ping) { + $Handle = RT::Handle->new(); + } + $Handle->Connect(); +} + =head2 InitLogging Create the RT::Logger object. @@ -282,8 +294,15 @@ sub DropSetGIDPermissions { =head1 BUGS +Please report them to rt-3.0-bugs@fsck.com, if you know what's broken and have at least some idea of what needs to be fixed. +If you're not sure what's going on, report them rt-devel@lists.fsck.com. + =head1 SEE ALSO +L<RT::StyleGuide> +L<DBIx::SearchBuilder> + + =begin testing |