Revision c4d83bf8
Added by Ermal LUÇI almost 14 years ago
etc/inc/pkg-utils.inc | ||
---|---|---|
754 | 754 |
return false; |
755 | 755 |
} |
756 | 756 |
} |
757 |
|
|
758 |
/* custom commands */ |
|
759 |
$static_output .= gettext("Custom commands...") . "\n"; |
|
760 |
update_output_window($static_output); |
|
761 |
if ($missing_include == false) { |
|
762 |
if($pkg_config['custom_php_global_functions'] <> "") { |
|
763 |
$static_output .= gettext("Executing custom_php_global_functions()..."); |
|
764 |
update_output_window($static_output); |
|
765 |
eval_once($pkg_config['custom_php_global_functions']); |
|
766 |
$static_output .= gettext("done.") . "\n"; |
|
767 |
update_output_window($static_output); |
|
768 |
} |
|
769 |
if($pkg_config['custom_php_install_command']) { |
|
770 |
$static_output .= gettext("Executing custom_php_install_command()..."); |
|
771 |
update_output_window($static_output); |
|
772 |
eval_once($pkg_config['custom_php_install_command']); |
|
773 |
$static_output .= gettext("done.") . "\n"; |
|
774 |
update_output_window($static_output); |
|
775 |
} |
|
776 |
if($pkg_config['custom_php_resync_config_command'] <> "") { |
|
777 |
$static_output .= gettext("Executing custom_php_resync_config_command()..."); |
|
778 |
update_output_window($static_output); |
|
779 |
eval_once($pkg_config['custom_php_resync_config_command']); |
|
780 |
$static_output .= gettext("done.") . "\n"; |
|
781 |
update_output_window($static_output); |
|
782 |
} |
|
783 |
} |
|
784 |
|
|
785 |
/* custom commands */ |
|
786 |
$static_output .= "Custom commands...\n"; |
|
787 |
update_output_window($static_output); |
|
788 |
if ($missing_include == false) { |
|
789 |
if($pkg_config['custom_php_global_functions'] <> "") { |
|
790 |
$static_output .= "Executing custom_php_global_functions()..."; |
|
791 |
update_output_window($static_output); |
|
792 |
eval_once($pkg_config['custom_php_global_functions']); |
|
793 |
$static_output .= "done.\n"; |
|
794 |
update_output_window($static_output); |
|
795 |
} |
|
796 |
if($pkg_config['custom_php_install_command']) { |
|
797 |
$static_output .= "Executing custom_php_install_command()..."; |
|
798 |
update_output_window($static_output); |
|
799 |
eval_once($pkg_config['custom_php_install_command']); |
|
800 |
$static_output .= "done.\n"; |
|
801 |
update_output_window($static_output); |
|
802 |
} |
|
803 |
if($pkg_config['custom_php_resync_config_command'] <> "") { |
|
804 |
$static_output .= "Executing custom_php_resync_config_command()..."; |
|
805 |
update_output_window($static_output); |
|
806 |
eval_once($pkg_config['custom_php_resync_config_command']); |
|
807 |
$static_output .= "done.\n"; |
|
808 |
update_output_window($static_output); |
|
809 |
} |
|
810 |
} |
|
757 | 811 |
/* sidebar items */ |
758 | 812 |
if(is_array($pkg_config['menu'])) { |
759 | 813 |
$static_output .= "Menu items... "; |
... | ... | |
802 | 856 |
$static_output .= "done.\n"; |
803 | 857 |
update_output_window($static_output); |
804 | 858 |
} |
805 |
|
|
806 |
/* custom commands */ |
|
807 |
$static_output .= "Custom commands...\n"; |
|
808 |
update_output_window($static_output); |
|
809 |
if ($missing_include == false) { |
|
810 |
if($pkg_config['custom_php_global_functions'] <> "") { |
|
811 |
$static_output .= "Executing custom_php_global_functions()..."; |
|
812 |
update_output_window($static_output); |
|
813 |
eval_once($pkg_config['custom_php_global_functions']); |
|
814 |
$static_output .= "done.\n"; |
|
815 |
update_output_window($static_output); |
|
816 |
} |
|
817 |
if($pkg_config['custom_php_install_command']) { |
|
818 |
$static_output .= "Executing custom_php_install_command()..."; |
|
819 |
update_output_window($static_output); |
|
820 |
eval_once($pkg_config['custom_php_install_command']); |
|
821 |
$static_output .= "done.\n"; |
|
822 |
update_output_window($static_output); |
|
823 |
} |
|
824 |
if($pkg_config['custom_php_resync_config_command'] <> "") { |
|
825 |
$static_output .= "Executing custom_php_resync_config_command()..."; |
|
826 |
update_output_window($static_output); |
|
827 |
eval_once($pkg_config['custom_php_resync_config_command']); |
|
828 |
$static_output .= "done.\n"; |
|
829 |
update_output_window($static_output); |
|
830 |
} |
|
831 |
} |
|
832 | 859 |
} else { |
833 | 860 |
$static_output .= "Loading package configuration... failed!\n\nInstallation aborted."; |
834 | 861 |
update_output_window($static_output); |
Also available in: Unified diff
Move seting up of tabs/menus/service entries after custom php commands. Seems there is something tripping config vars that make these steps not work.