[BUGFIX] .inc files still call cObj->checkEmail
authorMarkus Klein <klein.t3@mfc-linz.at>
Fri, 4 Nov 2011 16:58:36 +0000 (11:58 -0500)
committerGeorg Ringer <mail@ringerge.org>
Wed, 8 Feb 2012 06:30:46 +0000 (07:30 +0100)
The cObj->checkEmail function has been removed in 4.6,
but *.inc scripts still call this function.

This patch replaces these calls with t3lib_div::validEmail().

Change-Id: I11a55d5ae5ca5045df253b81e315a21b5eb712c0
Fixes: #31573
Releases: 4.7, 4.6
Reviewed-on: http://review.typo3.org/6545
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
typo3/sysext/cms/tslib/media/scripts/fe_adminLib.inc
typo3/sysext/statictemplates/media/scripts/fe_adminLib.inc

index e377dfa..221dba6 100755 (executable)
@@ -620,7 +620,7 @@ class user_feAdmin  {
                                                        }
                                                break;
                                                case 'email':
-                                                       if (!$this->cObj->checkEmail($this->dataArr[$theField]))        {
+                                                       if (!t3lib_div::validEmail($this->dataArr[$theField]))  {
                                                                $tempArr[]=$theField;
                                                                $this->failureMsg[$theField][] = $this->getFailure($theField, $theCmd, 'You must enter a valid email address');
                                                        }
@@ -1298,7 +1298,7 @@ class user_feAdmin        {
                                if (is_array($DBrows))  {
                                        $recipient = $DBrows[0][$this->conf['email.']['field']];
                                        $this->compileMail($config['label'], $DBrows, $recipient, $this->conf['setfixed.']);
-                               } elseif ($this->cObj->checkEmail($fetch)) {
+                               } elseif (t3lib_div::validEmail($fetch)) {
                                        $this->sendMail($fetch, '', trim($this->cObj->getSubpart($this->templateCode, '###'.$this->emailMarkPrefix.'NORECORD###')));
                                }
 
@@ -1667,4 +1667,4 @@ class user_feAdmin        {
 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['media/scripts/fe_adminLib.inc'])) {
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['media/scripts/fe_adminLib.inc']);
 }
-?>
\ No newline at end of file
+?>
index 39925e6..2dd5a18 100644 (file)
@@ -622,7 +622,7 @@ class user_feAdmin  {
                                                        }
                                                break;
                                                case 'email':
-                                                       if (!$this->cObj->checkEmail($this->dataArr[$theField]))        {
+                                                       if (!t3lib_div::validEmail($this->dataArr[$theField]))  {
                                                                $tempArr[]=$theField;
                                                                $this->failureMsg[$theField][] = $this->getFailure($theField, $theCmd, 'You must enter a valid email address');
                                                        }
@@ -1300,7 +1300,7 @@ class user_feAdmin        {
                                if (is_array($DBrows))  {
                                        $recipient = $DBrows[0][$this->conf['email.']['field']];
                                        $this->compileMail($config['label'], $DBrows, $recipient, $this->conf['setfixed.']);
-                               } elseif ($this->cObj->checkEmail($fetch)) {
+                               } elseif (t3lib_div::validEmail($fetch)) {
                                        $this->sendMail($fetch, '', trim($this->cObj->getSubpart($this->templateCode, '###'.$this->emailMarkPrefix.'NORECORD###')));
                                }