1
0
Fork 0
Dieser Commit ist enthalten in:
DSB 2012-07-23 08:56:12 +00:00
Ursprung 78afe70561
Commit 6bcfcaec43

Datei anzeigen

@ -301,14 +301,14 @@ class ConfigController extends Zend_Controller_Action
$index = (int)$this->_request->getPost('param'); $index = (int)$this->_request->getPost('param');
// fetch the required params // fetch the required params
$server = $postData['ftp_'.$index.'_server']; $server = $postData['ftp_' . $index . '_server'];
$port = $postData['ftp_'.$index.'_port']; $port = $postData['ftp_' . $index . '_port'];
$timeout = $postData['ftp_'.$index.'_timeout']; $timeout = $postData['ftp_' . $index . '_timeout'];
$mode = $postData['ftp_'.$index.'_passiveMode']; $mode = $postData['ftp_' . $index . '_passiveMode'];
$ssl = $postData['ftp_'.$index.'_ssl']; $ssl = $postData['ftp_' . $index . '_ssl'];
$user = $postData['ftp_'.$index.'_user']; $user = $postData['ftp_' . $index . '_user'];
$password = $postData['ftp_'.$index.'_pass']; $password = $postData['ftp_' . $index . '_pass'];
$directory = $postData['ftp_'.$index.'_dir']; $directory = $postData['ftp_' . $index . '_dir'];
// Params for transferring a test file // Params for transferring a test file
$name = 'ftp_transfer_testfile.txt'; $name = 'ftp_transfer_testfile.txt';
@ -345,7 +345,7 @@ class ConfigController extends Zend_Controller_Action
ftp_chmod($ftpStream, 0755, $targetFolder); ftp_chmod($ftpStream, 0755, $targetFolder);
$message = ''; $message = '';
// ftp directory exists and chmod ok? let's test the ftp transfer with a test file // ftp directory exists and chmod ok? let's test the ftp transfer with a test file
} else if (!ftp_put($ftpStream, $targetFolder.$name, $filename, FTP_ASCII)) { } else if (!ftp_put($ftpStream, $targetFolder . $name, $filename, FTP_ASCII)) {
$message = sprintf($translator->_('L_FTP_FILE_TRANSFER_ERROR'), $name); $message = sprintf($translator->_('L_FTP_FILE_TRANSFER_ERROR'), $name);
} else { } else {
@ -355,8 +355,8 @@ class ConfigController extends Zend_Controller_Action
$translator->_('L_FTP_OK'); $translator->_('L_FTP_OK');
// delete the test file after a successful transfer test // delete the test file after a successful transfer test
if (file_exists($targetFolder.$name)) { if (file_exists($targetFolder . $name)) {
ftp_delete($ftpStream, $targetFolder.$name); ftp_delete($ftpStream, $targetFolder . $name);
} }
} }