# HG changeset patch # User Chris Cannam # Date 1297087632 0 # Node ID 2eaccf99a7b0263723eb510287309a5225e70965 # Parent 90cc857e968a883b2795a18d9ae9ea90c6f45db3# Parent 172b8d25c1ae49f4f1a4d1642454822f00000aea Merge from branch "live" diff -r 90cc857e968a -r 2eaccf99a7b0 app/views/layouts/base.rhtml --- a/app/views/layouts/base.rhtml Mon Feb 07 12:52:57 2011 +0000 +++ b/app/views/layouts/base.rhtml Mon Feb 07 14:07:12 2011 +0000 @@ -3,8 +3,8 @@ <%=h html_title %> - - + + <%= favicon %> <%= stylesheet_link_tag 'application', :media => 'all' %> <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %> diff -r 90cc857e968a -r 2eaccf99a7b0 extra/svn/SoundSoftware.pm --- a/extra/svn/SoundSoftware.pm Mon Feb 07 12:52:57 2011 +0000 +++ b/extra/svn/SoundSoftware.pm Mon Feb 07 14:07:12 2011 +0000 @@ -160,7 +160,7 @@ sub access_handler { my $r = shift; - print STDERR "SoundSoftware.pm: In access handler\n"; + print STDERR "SoundSoftware.pm: In access handler at " . scalar localtime() . "\n"; unless ($r->some_auth_required) { $r->log_reason("No authentication has been configured"); @@ -178,6 +178,13 @@ } my $dbh = connect_database($r); + unless ($dbh) { + print STDERR "SoundSoftware.pm: Database connection failed!: " . $DBI::errstr . "\n"; + return FORBIDDEN; + } + + +print STDERR "Connected to db, dbh is " . $dbh . "\n"; my $project_id = get_project_identifier($dbh, $r); my $status = get_project_status($dbh, $project_id, $r); @@ -201,9 +208,13 @@ sub authen_handler { my $r = shift; - print STDERR "SoundSoftware.pm: In authentication handler\n"; + print STDERR "SoundSoftware.pm: In authentication handler at " . scalar localtime() . "\n"; my $dbh = connect_database($r); + unless ($dbh) { + print STDERR "SoundSoftware.pm: Database connection failed!: " . $DBI::errstr . "\n"; + return AUTH_REQUIRED; + } my $project_id = get_project_identifier($dbh, $r); my $realm = get_realm($dbh, $project_id, $r); @@ -415,8 +426,8 @@ (__PACKAGE__, $r->server, $r->per_dir_config); return DBI->connect($cfg->{SoundSoftwareDSN}, - $cfg->{SoundSoftwareDbUser}, - $cfg->{SoundSoftwareDbPass}); + $cfg->{SoundSoftwareDbUser}, + $cfg->{SoundSoftwareDbPass}); } 1;