#18589928 : fixed a problem that FTP information is not stored

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7110 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
haneul 2010-01-04 12:48:06 +00:00
parent 23036eda1d
commit 98e87e09c7
3 changed files with 19 additions and 2 deletions

View file

@ -1,4 +1,4 @@
<filter name="install_ftp_path" module="install" act="procInstallAdminSaveFTPInfo" confirm_msg_code="confirm_submit">
<filter name="install_ftp_path" module="install" act="procInstallAdminSaveFTPPath" confirm_msg_code="confirm_submit">
<form>
<node target="ftp_root_path" required="true" />
</form>

View file

@ -16,5 +16,6 @@
<action name="procInstallAdminSaveTimeZone" type="controller" standalone="true" />
<action name="procInstallAdminSaveLangSelected" type="controller" standalone="true" />
<action name="procInstallAdminSaveFTPInfo" type="controller" standalone="true" />
<action name="procInstallAdminSaveFTPPath" type="controller" standalone="true" />
</actions>
</module>

View file

@ -119,11 +119,27 @@
$this->setMessage('success_updated');
}
function procInstallAdminSaveFTPInfo() {
$ftp_info = Context::getFTPInfo();
$ftp_info->ftp_user = Context::get('ftp_user');
$ftp_info->ftp_password = Context::get('ftp_password');
$ftp_info->ftp_port = Context::get('ftp_port');
$ftp_info->sftp = Context::get('sftp');
$buff = '<?php if(!defined("__ZBXE__")) exit();'."\n";
foreach($ftp_info as $key => $val) {
if(!$val) continue;
$buff .= sprintf("\$ftp_info->%s = '%s';\n", $key, str_replace("'","\\'",$val));
}
$buff .= "?>";
$config_file = Context::getFTPConfigFile();
FileHandler::WriteFile($config_file, $buff);
$this->setMessage('success_updated');
}
/**
* @brief FTP 정보 등록
**/
function procInstallAdminSaveFTPInfo() {
function procInstallAdminSaveFTPPath() {
$ftp_info = Context::getFTPInfo();
$ftp_info->ftp_root_path = Context::get('ftp_root_path');
$buff = '<?php if(!defined("__ZBXE__")) exit();'."\n";