From 154c890a0b00ca459000412afc12f6303b2a347f Mon Sep 17 00:00:00 2001 From: Arnaud Desmons Date: Fri, 26 Jul 2002 15:32:42 +0000 Subject: added jump test for func element and jumpScript element back compatibility --- drakwizard.pl | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'drakwizard.pl') diff --git a/drakwizard.pl b/drakwizard.pl index 34065b02..81871a4d 100755 --- a/drakwizard.pl +++ b/drakwizard.pl @@ -147,15 +147,28 @@ sub navigation { navigation($o, find_page($o, $page->{jumpPage}), $page->{old_page}); } else { my ($next, $prev) = do { - if($page->{jumpScript}) { + if (defined $perl_module_name && $page->{func}) { + @func_arg = split(/\s/, $page->{func}); + $modStatus = $::{$perl_module_name."::"}{"$func_arg[0]"}->($func_arg[1]); + if ($page->{Target}->{jumpIndex}) { + if (!$page->{Target}->{jumpIndex}->{0}){ + find_page($o, $page->{Target}->{jumpIndex}->{int($modStatus)}), $page; + } + else { + $page->{next_page}, $page->{old_page}; + } + } + else { + $page->{next_page}, $page; + } + } + elsif ($page->{jumpScript}) { system("source $lib_script ; $page->{jumpScript}"); if ($page->{Target}->{jumpIndex}) { -# if(!$page->{Target}->{jumpIndex}->{0}){ -# $? = $? >> 8; #==0|2560 ? 10 : $?-255; -# } - $? = $? >> 8; + # if (!$page->{Target}->{jumpIndex}->{0}){ + $? = $? >> 8; find_page($o, $page->{Target}->{jumpIndex}->{$?}), $page; - } + } else { $page->{next_page}, $page->{old_page}; } -- cgit v1.2.1