[TYPO3-project-formidable] Improvement in sending mail via FORMidable

Jérémy Lecour jeremy.lecour at gmail.com
Tue Jun 20 12:39:49 CEST 2006


Hi,

This time, it's a real issue. In the Mail Actionlet, there is a check
for addresses.

It doesn't work correctly if no address is given because
t3lib_div:trimExplode() is always return an array, with at least one
empty element.
The next check is looking for an array with a size > 0, that is always
true because of the previous statement.

It could be improved in this way
(ameos_formidable/api/base/ameos_formidable_act_mail/api/class.tx_ameosformidableactmail.php:67)
:
-------		
if($this->oForm->_navConf("/addresses/userobj/", $aConf) !== false)
{ $aAddresses =
$this->oForm->_callUserObj($this->oForm->_navConf("/addresses/",
$aConf)); }
elseif ( $this->oForm->_navConf("/addresses/", $aConf) )
{ $aAddresses = t3lib_div::trimExplode(",",
$this->oForm->_navConf("/addresses/", $aConf)); }
else
{ $aAddresses = ""; }
		
if(is_array($aAddresses))
{ $aAddresses =
array_flip(array_change_key_case(array_flip($aAddresses),
CASE_LOWER)); }
elseif (strlen($aAddresses))
{ $aAddresses = array($aAddresses); }
--------

If you prefer a traditional diff, I can do it

-- 
Jérémy Lecour : <mailto:jeremy.lecour at gmail.com>
webdesigner, webmaster et développeur web
Trésorier du PLUG : Provence Linux User Group
http://www.plugfr.org/



More information about the TYPO3-project-formidable mailing list