[Fusionforge-commits] r14675 - in trunk/src: common/mail www/soap/tracker

Alain Peyrat aljeux at fusionforge.org
Tue Oct 18 19:57:01 CEST 2011


Author: aljeux
Date: 2011-10-18 19:57:01 +0200 (Tue, 18 Oct 2011)
New Revision: 14675

Modified:
   trunk/src/common/mail/Mail.class.php
   trunk/src/www/soap/tracker/tracker.php
Log:
Replace deprecated php functions.

Modified: trunk/src/common/mail/Mail.class.php
===================================================================
--- trunk/src/common/mail/Mail.class.php	2011-10-18 15:26:57 UTC (rev 14674)
+++ trunk/src/common/mail/Mail.class.php	2011-10-18 17:57:01 UTC (rev 14675)
@@ -130,27 +130,27 @@
      * @return list of email separated by ,
      */
     function _validateRecipient($list) {
-        $recipArray = split('[;,]', $list);
-        $retArray = array();
-	foreach($recipArray as $email) {
-		$email = trim($email);
-		if(!empty($email)) {
-			$user = UserManager::instance()->getUserByEmail($email);
-			if ($user) {
-				$allowed_status = array('A', 'R', 'P', 'V', 'W');
-				$one_with_status_allowed_found = false;
-				while ( !$one_with_status_allowed_found) {
-					if (in_array($user->getStatus(), $allowed_status)) {
-						$retArray[] = '"'.$this->_encodeHeader($user->getRealName(), $this->getHeaderCharset()).'" <'.$user->getEmail().'>';
-						$one_with_status_allowed_found = true;
-					}
-				}
-			} else {
-				$retArray[] = $email;
-			}
-		}
-	}
-	return implode(', ', $retArray);
+    	$recipArray = preg_split('/[;,]/', $list);
+    	$retArray = array();
+    	foreach($recipArray as $email) {
+    		$email = trim($email);
+    		if(!empty($email)) {
+    			$user = UserManager::instance()->getUserByEmail($email);
+    			if ($user) {
+    				$allowed_status = array('A', 'R', 'P', 'V', 'W');
+    				$one_with_status_allowed_found = false;
+    				while ( !$one_with_status_allowed_found) {
+    					if (in_array($user->getStatus(), $allowed_status)) {
+    						$retArray[] = '"'.$this->_encodeHeader($user->getRealName(), $this->getHeaderCharset()).'" <'.$user->getEmail().'>';
+    						$one_with_status_allowed_found = true;
+    					}
+    				}
+    			} else {
+    				$retArray[] = $email;
+    			}
+    		}
+    	}
+    	return implode(', ', $retArray);
     }
 
     var $_to;

Modified: trunk/src/www/soap/tracker/tracker.php
===================================================================
--- trunk/src/www/soap/tracker/tracker.php	2011-10-18 15:26:57 UTC (rev 14674)
+++ trunk/src/www/soap/tracker/tracker.php	2011-10-18 17:57:01 UTC (rev 14675)
@@ -585,7 +585,7 @@
 			if (array_key_exists($efid, $extra_field_info)) {
 				if ($extra_field_info[$efid]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_CHECKBOX ||
 						$extra_field_info[$efid]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_MULTISELECT) {
-					$data = split(",", $data);
+					$data = explode(',', $data);
 				}
 			}
 




More information about the Fusionforge-commits mailing list