Fix additional item syncing.

This commit is contained in:
Colin Smith 2005-03-07 03:05:36 +00:00
parent e4ae3e09c3
commit 1dc18caac0

View File

@ -553,15 +553,15 @@ function resync_all_package_configs_bootup($show_message) {
eval($pkg_config['custom_php_resync_config_command']);
if($show_message == true) print "Synced " . $package['name'] . ".\n";
if($pkg_config['additional_files_needed'] != "") {
foreach($pkg_config['additional_files_needed']['item'] as $item) {
$pkg_name = strrchr($item, "/");
if(!preg_match("/\.xml/", $pkg_name)) break;
foreach($pkg_config['additional_files_needed']['0']['item'] as $item) {
$pkg_name = substr(strrchr($item, "/"),1);
if(!preg_match("/\.xml/i", $pkg_name)) break;
if(!file_exists("/usr/local/pkg/" . $pkg_name)) {
if($show_message == true) print "Fetching " . $pkg_name . ".\n";
log_error("Fetching missing configuration XML for " . $pkg_name);
system("/usr/bin/fetch -o /usr/local/pkg/" . $pkg_name . " " . $item);
}
$item_config = parse_xml_config_pkg("/usr/local/pkg" . $pkg_name, "packagegui");
$item_config = parse_xml_config_pkg("/usr/local/pkg/" . $pkg_name, "packagegui");
if($show_message == true) print "Syncing " . $item_config['name'] . ".\n";
if($item_config['custom_php_command_before_form'] <> "")
eval($item_config['custom_php_command_before_form']);
@ -619,4 +619,4 @@ function gather_altq_queue_stats($dont_return_root_queues) {
return $queue_stats;
}
?>
?>