diff options
-rwxr-xr-x | drakwizard.pl | 25 |
1 files changed, 19 insertions, 6 deletions
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}; } |