Skip to content

Commit

Permalink
Item1453: support array entries in the switchboard
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@3459 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
CrawfordCurrie authored and CrawfordCurrie committed Apr 16, 2009
1 parent a5b89df commit b67fd14
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/lib/Foswiki/UI.pm
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -174,6 +174,16 @@ sub handleRequest {
return $res; return $res;
} }


if (ref($dispatcher) eq 'ARRAY') {
# Old-style array entry in switchboard from a plugin
my @array = @$dispatcher;
$dispatcher = {
package => $array[0],
function => $array{1],
context => $array[2],
};
}

if ( $dispatcher->{package} && !$isInitialized{$dispatcher->{package}} ) { if ( $dispatcher->{package} && !$isInitialized{$dispatcher->{package}} ) {
eval qq(use $dispatcher->{package}); eval qq(use $dispatcher->{package});
die $@ if $@; die $@ if $@;
Expand Down

0 comments on commit b67fd14

Please sign in to comment.