From 4f36119278119883f08d656d9646ab846ff1b233 Mon Sep 17 00:00:00 2001 From: D4rk4ng3l Date: Wed, 8 Aug 2012 21:39:42 +0000 Subject: [PATCH] Fixed FTP configuration tu use new Msd_Config class. --- application/controllers/ConfigController.php | 5 ++++- application/forms/Config/Ftp.php | 3 +++ library/Msd/Language.php | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/application/controllers/ConfigController.php b/application/controllers/ConfigController.php index 0ca4ae7..05e84e1 100644 --- a/application/controllers/ConfigController.php +++ b/application/controllers/ConfigController.php @@ -410,7 +410,10 @@ class ConfigController extends Msd_Controller_Action $element = str_replace($group . '_', '', $element); $element = str_replace('_', '.', $element); $value = $this->view->config->getParam($group . '.' . $element); - if ($value !== null) { + if (is_array($value)) { + list (, $key) = explode('.', $element); + $subForm->setDefault($element, $value[$key]); + } else if ($value !== null) { $subForm->setDefault($element, $value); } } diff --git a/application/forms/Config/Ftp.php b/application/forms/Config/Ftp.php index efc7d04..50c6dee 100644 --- a/application/forms/Config/Ftp.php +++ b/application/forms/Config/Ftp.php @@ -409,6 +409,9 @@ class Application_Form_Config_Ftp extends Zend_Form_SubForm */ public function setDefault($name, $value) { + if (is_array($value)) { + list($ftpId, $key) = explode('.', $name); + } $name = 'ftp_' . str_replace('.', '_', $name); parent::setDefault($name, $value); } diff --git a/library/Msd/Language.php b/library/Msd/Language.php index c7fd7e0..71f45e8 100644 --- a/library/Msd/Language.php +++ b/library/Msd/Language.php @@ -156,7 +156,7 @@ class Msd_Language /** * Get Translator * - * @return Zend_Translate + * @return Zend_Translate_Adapter */ public function getTranslator() {