Merge branch 'psgi' into WebGUI8

This commit is contained in:
Graham Knop 2010-06-11 23:05:06 -05:00
commit 89d4f46a18
94 changed files with 2002 additions and 2269 deletions

View file

@ -43,7 +43,8 @@ Defaults to 'url'. But if you want to use an assetId as the first parameter, the
#-------------------------------------------------------------------
sub process {
my ($session, $identifier, $type) = @_;
my $t = ($session->errorHandler->canShowPerformanceIndicators()) ? [Time::HiRes::gettimeofday()] : undef;
my $perfLog = $session->log->performanceLogger;
my $t = $perfLog ? [Time::HiRes::gettimeofday()] : undef;
my $asset;
if ($type eq 'assetId') {
$asset = eval { WebGUI::Asset->newById($session, $identifier); };
@ -79,8 +80,8 @@ sub process {
$asset->toggleToolbar;
$asset->prepareView;
my $output = $asset->view;
$output .= "AssetProxy:" . Time::HiRes::tv_interval($t)
if $t;
$perfLog->({ asset => $asset, time => Time::HiRes::tv_interval($t), type => 'Proxy'})
if $perfLog;
return $output;
}
return '';

View file

@ -92,8 +92,8 @@ sub process {
my $uploadsDir = Path::Class::Dir->new($session->config->get('uploadsPath'));
my $extrasDir = Path::Class::Dir->new($session->config->get('extrasPath'));
my $uploadsUrl = Path::Class::Dir->new($session->config->get('uploadsURL'));
my $extrasUrl = Path::Class::Dir->new($session->config->get('extrasURL'));
my $uploadsUrl = Path::Class::Dir->new($session->url->make_urlmap_work($session->config->get('uploadsURL')));
my $extrasUrl = Path::Class::Dir->new($session->url->make_urlmap_work($session->config->get('extrasURL')));
##Normal mode
if (! $session->var->isAdminOn) {

View file

@ -33,7 +33,7 @@ sub process {
# Get location for CSS and JS files
my $conf = $session->config;
my $extras = $conf->get("extrasURL");
my $extras = $session->url->make_urlmap_work($conf->get("extrasURL"));
# add CSS and JS to the page
my $style = $session->style;