Add the FilePump content handler in the right place in the config file.

This commit is contained in:
Colin Kuskie 2009-05-18 21:23:00 +00:00
parent 3d346bf76b
commit 98a1e4c409

View file

@ -23,6 +23,7 @@ use WebGUI::Session;
use WebGUI::Storage;
use WebGUI::Asset;
use WebGUI::FilePump::Bundle;
use WebGUI::Utility;
my $toVersion = '7.7.7';
my $quiet; # this line required
@ -128,8 +129,18 @@ sub installFilePumpHandler {
print "\tAdding FilePump content handler... \n" unless $quiet;
##Content Handler
my $contentHandlers = $session->config->get('contentHandlers');
$session->config->addToArray('contentHandlers', 'WebGUI::Content::FilePump');
$session->config->addToHash( 'macros', { FilePump => 'FilePump' });
my $handlers = $session->config->get('contentHandlers');
my $newHandlers = [];
if (!isIn('WebGUI::Content::FilePump', @{ $handlers })) {
foreach my $handler (@{ $handlers }) {
if ($handler eq 'WebGUI::Content::Operation') {
push @{ $newHandlers }, 'WebGUI::Content::FilePump';
}
push @{ $newHandlers }, $handler;
}
}
$session->config->set('contentHandlers', $newHandlers);
##Admin Console
$session->config->addToHash('adminConsole', 'filePump', {