Subversion Repositories VORC

Rev

Rev 53 | Rev 65 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 53 Rev 56
Line 1... Line 1...
1
#!/usr/bin/perl
1
#!/usr/bin/perl
Line -... Line 2...
-
 
2
 
-
 
3
# Redirect error messages to a log of my choosing. (it's annoying to filter for errors in the shared env)
-
 
4
my $error_log_path = $ENV{SERVER_NAME} eq "volunteers.rollercon.com" ? "/home3/rollerco/logs/" : "/tmp/";
-
 
5
close STDERR;
-
 
6
open STDERR, '>>', $error_log_path.'vorc_error.log' or warn "Failed to open redirected logfile ($0): $!";
-
 
7
#warn "Redirecting errors to ${error_log_path}vorc_error.log";
2
 
8
 
3
use strict;
9
use strict;
4
use cPanelUserConfig;
10
use cPanelUserConfig;
5
use WebDB;
11
use WebDB;
6
use HTML::Tiny;
12
use HTML::Tiny;
Line 184... Line 190...
184
	  $dbh->disconnect ();
190
	  $dbh->disconnect ();
Line 185... Line 191...
185
	  
191
	  
186
	  # did we find a record?
192
	  # did we find a record?
Line -... Line 193...
-
 
193
	  error ("You don't seem to have Personal Time with that database ID ($R->{$primary}).") unless defined $F{$DBFields[0]};
-
 
194
    
-
 
195
    # If the DB returns a null value, HTML::Tiny doesn't like it, so make sure nulls are converted to empty strings.
187
	  error ("You don't seem to have Personal Time with that database ID ($R->{$primary}).") unless defined $F{$DBFields[0]};
196
    map { $F{$_} = "" unless $F{$_} } @DBFields;
188
    
197
    
189
    if ($view eq "Update") {
198
    if ($view eq "Update") {
Line 190... Line 199...
190
      # We'd like to update that thing, give the user a form...
199
      # We'd like to update that thing, give the user a form...