Fixed sending the recommendation to multiple receivers
authorNicole Cordes <cordes@cps-it.de>
Tue, 21 May 2013 18:15:15 +0000 (20:15 +0200)
committerNicole Cordes <cordes@cps-it.de>
Tue, 21 May 2013 18:15:15 +0000 (20:15 +0200)
ChangeLog
pi1/class.tx_tipafriendplus_pi1.php

index 3777039..e2fd4f5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
-(add new changes on top of this file)
 2013-05-21     Nicole Cordes <cordes@cps-it.de>
 
        * Added tipHash as security parameter to avoid XSS on links
+       * Fixed sending the recommendation to multiple receivers
 
 07-06-05   <>
 
index fde35d8..3ac24ec 100644 (file)
@@ -300,16 +300,10 @@ class tx_tipafriendplus_pi1 extends tslib_pibase {
         * @return      [type]          ...
         */
        function getRecipients($emails) {
-               $emailArr = split('[, ;]',$emails);
-               reset($emailArr);
-               $listArr=array();
-               while(list(,$email)=each($emailArr))    {
-                       $email = trim($email);
-                       if ($email && t3lib_div::validEmail($email))    {
-                               $listArr[] = $email;
-                       }
-               }
-               return implode(',',$listArr);
+               // Prevent sending this recommendation to multiple recipients
+               $emailArr = preg_split('/[,; ]/', $emails);
+
+               return $emailArr[0];
        }