Commit aa3ea245 authored by tbrehm's avatar tbrehm
Browse files

Implemented: FS#1325 - Option to create remoting user automatically during...

Implemented: FS#1325 - Option to create remoting user automatically during package installation from repository
Implemented: VAT-ID and customer No. fields for client and reseller.
parent eab50855
......@@ -6,4 +6,5 @@ $wb['package_description_txt'] = 'Opis';
$wb['action_txt'] = 'Akcja';
$wb['toolsarea_head_txt'] = 'Packages';
$wb['repoupdate_txt'] = 'Update package list';
$wb['package_id_txt'] = 'local App-ID';
?>
<?php
$wb["repo_name_txt"] = 'Repository';
$wb["repo_url_txt"] = 'URL';
$wb["repo_username_txt"] = 'User (optional)';
$wb["repo_password_txt"] = 'Password (optional)';
$wb["active_txt"] = 'Active';
$wb['repo_name_txt'] = 'Repository';
$wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'User (optional)';
$wb['repo_password_txt'] = 'Password (optional)';
$wb['active_txt'] = 'Active';
?>
<?php
$wb["head_txt"] = 'Install software package';
$wb["install_key_txt"] = 'Enter install key';
$wb["btn_save_txt"] = 'Start Installation';
$wb["btn_cancel_txt"] = 'Cancel';
$wb['head_txt'] = 'Install software package';
$wb['install_key_txt'] = 'Enter install key';
$wb['btn_save_txt'] = 'Start Installation';
$wb['btn_cancel_txt'] = 'Cancel';
?>
......@@ -6,4 +6,5 @@ $wb['package_description_txt'] = 'Descrição';
$wb['action_txt'] = 'Acção';
$wb['toolsarea_head_txt'] = 'Packages';
$wb['repoupdate_txt'] = 'Update package list';
$wb['package_id_txt'] = 'local App-ID';
?>
<?php
$wb["repo_name_txt"] = 'Repository';
$wb["repo_url_txt"] = 'URL';
$wb["repo_username_txt"] = 'User (optional)';
$wb["repo_password_txt"] = 'Password (optional)';
$wb["active_txt"] = 'Active';
$wb['repo_name_txt'] = 'Repository';
$wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'User (optional)';
$wb['repo_password_txt'] = 'Password (optional)';
$wb['active_txt'] = 'Active';
?>
<?php
$wb["head_txt"] = 'Install software package';
$wb["install_key_txt"] = 'Enter install key';
$wb["btn_save_txt"] = 'Start Installation';
$wb["btn_cancel_txt"] = 'Cancel';
$wb['head_txt'] = 'Install software package';
$wb['install_key_txt'] = 'Enter install key';
$wb['btn_save_txt'] = 'Start Installation';
$wb['btn_cancel_txt'] = 'Cancel';
?>
......@@ -6,4 +6,5 @@ $wb['package_description_txt'] = 'Descriere';
$wb['action_txt'] = 'Actiune';
$wb['toolsarea_head_txt'] = 'Packages';
$wb['repoupdate_txt'] = 'Update package list';
$wb['package_id_txt'] = 'local App-ID';
?>
<?php
$wb["repo_name_txt"] = 'Repository';
$wb["repo_url_txt"] = 'URL';
$wb["repo_username_txt"] = 'User (optional)';
$wb["repo_password_txt"] = 'Password (optional)';
$wb["active_txt"] = 'Active';
$wb['repo_name_txt'] = 'Repository';
$wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'User (optional)';
$wb['repo_password_txt'] = 'Password (optional)';
$wb['active_txt'] = 'Active';
?>
<?php
$wb["head_txt"] = 'Install software package';
$wb["install_key_txt"] = 'Enter install key';
$wb["btn_save_txt"] = 'Start Installation';
$wb["btn_cancel_txt"] = 'Cancel';
$wb['head_txt'] = 'Install software package';
$wb['install_key_txt'] = 'Enter install key';
$wb['btn_save_txt'] = 'Start Installation';
$wb['btn_cancel_txt'] = 'Cancel';
?>
......@@ -6,4 +6,5 @@ $wb['package_description_txt'] = 'Описание';
$wb['action_txt'] = 'Действие';
$wb['toolsarea_head_txt'] = 'Packages';
$wb['repoupdate_txt'] = 'Update package list';
$wb['package_id_txt'] = 'local App-ID';
?>
<?php
$wb["repo_name_txt"] = 'Repository';
$wb["repo_url_txt"] = 'URL';
$wb["repo_username_txt"] = 'User (optional)';
$wb["repo_password_txt"] = 'Password (optional)';
$wb["active_txt"] = 'Active';
$wb['repo_name_txt'] = 'Repository';
$wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'User (optional)';
$wb['repo_password_txt'] = 'Password (optional)';
$wb['active_txt'] = 'Active';
?>
<?php
$wb["head_txt"] = 'Install software package';
$wb["install_key_txt"] = 'Enter install key';
$wb["btn_save_txt"] = 'Start Installation';
$wb["btn_cancel_txt"] = 'Cancel';
$wb['head_txt'] = 'Install software package';
$wb['install_key_txt'] = 'Enter install key';
$wb['btn_save_txt'] = 'Start Installation';
$wb['btn_cancel_txt'] = 'Cancel';
?>
......@@ -6,4 +6,5 @@ $wb['package_description_txt'] = 'Description';
$wb['action_txt'] = 'Action';
$wb['toolsarea_head_txt'] = 'Packages';
$wb['repoupdate_txt'] = 'Update package list';
$wb['package_id_txt'] = 'local App-ID';
?>
<?php
$wb["repo_name_txt"] = 'Repository';
$wb["repo_url_txt"] = 'URL';
$wb["repo_username_txt"] = 'User (optional)';
$wb["repo_password_txt"] = 'Password (optional)';
$wb["active_txt"] = 'Active';
$wb['repo_name_txt'] = 'Repository';
$wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'User (optional)';
$wb['repo_password_txt'] = 'Password (optional)';
$wb['active_txt'] = 'Active';
?>
<?php
$wb["head_txt"] = 'Install software package';
$wb["install_key_txt"] = 'Enter install key';
$wb["btn_save_txt"] = 'Start Installation';
$wb["btn_cancel_txt"] = 'Cancel';
$wb['head_txt'] = 'Install software package';
$wb['install_key_txt'] = 'Enter install key';
$wb['btn_save_txt'] = 'Start Installation';
$wb['btn_cancel_txt'] = 'Cancel';
?>
......@@ -6,4 +6,5 @@ $wb['package_description_txt'] = 'Popis';
$wb['action_txt'] = 'Akcia';
$wb['toolsarea_head_txt'] = 'Packages';
$wb['repoupdate_txt'] = 'Update package list';
$wb['package_id_txt'] = 'local App-ID';
?>
<?php
$wb["repo_name_txt"] = 'Repository';
$wb["repo_url_txt"] = 'URL';
$wb["repo_username_txt"] = 'User (optional)';
$wb["repo_password_txt"] = 'Password (optional)';
$wb["active_txt"] = 'Active';
$wb['repo_name_txt'] = 'Repository';
$wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'User (optional)';
$wb['repo_password_txt'] = 'Password (optional)';
$wb['active_txt'] = 'Active';
?>
<?php
$wb["head_txt"] = 'Install software package';
$wb["install_key_txt"] = 'Enter install key';
$wb["btn_save_txt"] = 'Start Installation';
$wb["btn_cancel_txt"] = 'Cancel';
$wb['head_txt'] = 'Install software package';
$wb['install_key_txt'] = 'Enter install key';
$wb['btn_save_txt'] = 'Start Installation';
$wb['btn_cancel_txt'] = 'Cancel';
?>
......@@ -6,4 +6,5 @@ $wb['package_description_txt'] = 'Açıklama';
$wb['action_txt'] = 'Eylem';
$wb['toolsarea_head_txt'] = 'Packages';
$wb['repoupdate_txt'] = 'Update package list';
$wb['package_id_txt'] = 'local App-ID';
?>
......@@ -89,10 +89,42 @@ if($install_server_id > 0 && $package_name != '' && ($package['package_installab
'database_password' => md5(mt_rand()),
'database_host' => 'localhost');
$package_config_str = $app->ini_parser->get_ini_string($package_config_array);
$package['package_config'] = $package_config_str;
$app->db->datalogUpdate('software_package', "package_config = '".$app->db->quote($package_config_str)."'", 'package_id',$package['package_id']);
}
}
//* If the packages requires a remote user
if($package['package_remote_functions'] != '') {
if(trim($package['package_config']) != '') {
$package_config_array = $app->ini_parser->parse_ini_string(stripslashes($package['package_config']));
}
if(!isset($package_config_array['remote_api'])) {
$remote_user = 'ispapp'.$package['package_id'];
$remote_password = md5(mt_rand());
$remote_functions = $app->db->quote($package['package_remote_functions']);
$package_config_array['remote_api'] = array(
'remote_hostname' => $_SERVER['HTTP_HOST'],
'remote_user' => $remote_user,
'remote_password' => $remote_password
);
$package_config_str = $app->ini_parser->get_ini_string($package_config_array);
$package['package_config'] = $package_config_str;
$app->db->datalogUpdate('software_package', "package_config = '".$app->db->quote($package_config_str)."'", 'package_id',$package['package_id']);
$sql = "INSERT INTO `remote_user` (`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `remote_username`, `remote_password`, `remote_functions`) VALUES
(1, 1, 'riud', 'riud', '', '$remote_user', '$remote_password', '$remote_functions');";
$app->db->query($sql);
}
}
//* Add the record to start the install process
$insert_data = "(package_name, server_id, software_update_id, status) VALUES ('$package_name', '$install_server_id', '$software_update_id','installing')";
$app->db->datalogInsert('software_update_inst', $insert_data, 'software_update_inst_id');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment