use warnings;
use vars qw( $FSURL $QUERY_STRING );
use base 'HTML::Mason::Request';
+use IO::Handle;
use FS::Trace;
-use FS::access_user_log;
$FSURL = 'http://Set/FS_Mason_Request_FSURL/in_standalone_mode/';
$QUERY_STRING = '';
sub freeside_setup {
my( $class, $filename, $mode ) = @_;
- FS::Trace->log(' protecting fds');
-
#from rt/bin/webmux.pl(.in)
if ( !$protect_fds && $ENV{'MOD_PERL'} && exists $ENV{'MOD_PERL_API_VERSION'}
&& $ENV{'MOD_PERL_API_VERSION'} >= 2
) {
+ FS::Trace->log(' protecting fds');
# under mod_perl2, STDIN and STDOUT get closed and re-opened,
# however they are not on FD 0 and 1. In this case, the next
# socket that gets opened will occupy one of these FDs, and make
}
- FS::access_user_log->insert_new_path( $filename );
-
FS::Trace->log(' done');
}
'access_user_log' => {
'columns' => [
- 'lognum', 'serial', '', '', '', '',
- 'usernum', 'int', '', '', '', '',
- 'path', 'varchar', '', 2*$char_d, '', '',
- '_date', @date_type, '', '',
+ 'lognum', 'serial', '', '', '', '',
+ 'usernum', 'int', '', '', '', '',
+ 'path', 'varchar', '', 2*$char_d, '', '',
+ '_date', @date_type, '', '',
+ 'render_seconds', 'int', 'NULL', '', '', '',
],
'primary_key' => 'lognum',
'unique' => [],
_date
+=item render_seconds
=back
=cut
sub insert_new_path {
- my( $class, $path ) = @_;
+ my( $class, $path, $render_seconds ) = @_;
return '' unless defined $FS::CurrentUser::CurrentUser;
my $self = $class->new( {
- 'usernum' => $FS::CurrentUser::CurrentUser->usernum,
- 'path' => $path,
- '_date' => time,
+ 'usernum' => $FS::CurrentUser::CurrentUser->usernum,
+ 'path' => $path,
+ '_date' => time,
+ 'render_seconds' => $render_seconds,
} );
my $error = $self->insert;
|| $self->ut_foreign_key('usernum', 'access_user', 'usernum')
|| $self->ut_text('path')
|| $self->ut_number('_date')
+ || $self->ut_numbern('render_seconds')
;
return $error if $error;
use warnings;
use FS::Mason qw( mason_interps );
use FS::Trace;
+use FS::access_user_log;
use FS::Conf;
$FS::Conf::conf_cache_enabled = 1; # enable FS::Conf caching for performance
#($r) = @_;
my $r = shift;
+ my $start_time = time;
+
FS::Trace->log('protecting fds');
#from rt/bin/webmux.pl(.in)
# );
# }
+ FS::access_user_log->insert_new_path( $r->filename, time-$start_time );
+\
FS::Trace->log('done');
FS::Trace->dumpfile( "%%%FREESIDE_EXPORT%%%/profile/$$.".time,