don't add javascript i18n content handler if it already exists
This commit is contained in:
parent
b7937249d6
commit
f43695ecf7
1 changed files with 4 additions and 1 deletions
|
|
@ -73,12 +73,15 @@ sub installAjaxI18N {
|
|||
my $session = shift;
|
||||
print "\tInstalling the AjaxI18N content handler... " unless $quiet;
|
||||
|
||||
my $oldHandlers = $session->config->get( "contentHandlers" );
|
||||
my @newHandlers;
|
||||
my $oldHandlers = $session->config->get( "contentHandlers" );
|
||||
for my $handler ( @{ $oldHandlers } ) {
|
||||
if ( $handler eq "WebGUI::Content::Operation" ) {
|
||||
push @newHandlers, "WebGUI::Content::AjaxI18N";
|
||||
}
|
||||
elsif ( $handler eq "WebGUI::Content::AjaxI18N" ) {
|
||||
next;
|
||||
}
|
||||
push @newHandlers, $handler;
|
||||
}
|
||||
$session->config->set( "contentHandlers", \@newHandlers );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue