# HG changeset patch
# User Chris Cannam
# Date 1297088000 0
# Node ID 5da98461a9f6f91b2e71c0abd280be63e8056e4d
# Parent c56dcdfe67225328ab3be4bcb13eb3bfe0403153# Parent 172b8d25c1ae49f4f1a4d1642454822f00000aea
Merge from branch "live"
diff -r c56dcdfe6722 -r 5da98461a9f6 app/views/layouts/base.rhtml
--- a/app/views/layouts/base.rhtml Mon Feb 07 13:16:36 2011 +0000
+++ b/app/views/layouts/base.rhtml Mon Feb 07 14:13:20 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 c56dcdfe6722 -r 5da98461a9f6 extra/soundsoftware/SoundSoftware.pm
--- a/extra/soundsoftware/SoundSoftware.pm Mon Feb 07 13:16:36 2011 +0000
+++ b/extra/soundsoftware/SoundSoftware.pm Mon Feb 07 14:13:20 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;