From f43695ecf79abab6cb6aa795db05f9af6c080c64 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 4 Nov 2008 22:47:01 +0000 Subject: [PATCH] don't add javascript i18n content handler if it already exists --- docs/upgrades/upgrade_7.6.1-7.6.2.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/upgrades/upgrade_7.6.1-7.6.2.pl b/docs/upgrades/upgrade_7.6.1-7.6.2.pl index 6319114fb..012697856 100644 --- a/docs/upgrades/upgrade_7.6.1-7.6.2.pl +++ b/docs/upgrades/upgrade_7.6.1-7.6.2.pl @@ -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 );