Fixed bug #1374: Mailforms didn't work with <input type="image"> submit buttons....
authorIngmar Schlecht <ingmar.schlecht@typo3.org>
Mon, 15 May 2006 20:39:21 +0000 (20:39 +0000)
committerIngmar Schlecht <ingmar.schlecht@typo3.org>
Mon, 15 May 2006 20:39:21 +0000 (20:39 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@1473 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/tslib/class.tslib_fe.php

index 81e8ad9..afa40b4 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2006-05-15  Ingmar Schlecht  <ingmar@typo3.org>
+
+       * Fixed bug #1374: Mailforms didn't work with <input type="image"> submit buttons. (Thanks to Thorsten Kahler and Rupert Germann!)
 
 2006-05-15  Martin Kutschker  <martin.t.kutschker@blackbox.net>
 
index c09d946..86bae9d 100755 (executable)
         */
        function checkDataSubmission()  {
                $ret = '';
-               if ($_POST['formtype_db'] || $_POST['formtype_mail'])   {
+               $formtype_db = isset($_POST['formtype_db']) || isset($_POST['formtype_db_x']);
+               $formtype_mail = isset($_POST['formtype_mail']) || isset($_POST['formtype_mail_x']);
+               if ($formtype_db || $formtype_mail)     {
                        $refInfo = parse_url(t3lib_div::getIndpEnv('HTTP_REFERER'));
                        if (t3lib_div::getIndpEnv('TYPO3_HOST_ONLY')==$refInfo['host'] || $this->TYPO3_CONF_VARS['SYS']['doNotCheckReferer'])   {
                                if ($this->locDataCheck($_POST['locationData']))        {
-                                       if ($_POST['formtype_mail'])    {
+                                       if ($formtype_mail)     {
                                                $ret = 'email';
-                                       } elseif ($_POST['formtype_db'] && is_array($_POST['data']))    {
+                                       } elseif ($formtype_db && is_array($_POST['data']))     {
                                                $ret = 'fe_tce';
                                        }
                                        $GLOBALS['TT']->setTSlogMessage('"Check Data Submission": Return value: '.$ret,0);
                $EMAIL_VARS = t3lib_div::_POST();
                $locationData = $EMAIL_VARS['locationData'];
                unset($EMAIL_VARS['locationData']);
-               unset($EMAIL_VARS['formtype_mail']);
+               unset($EMAIL_VARS['formtype_mail'], $EMAIL_VARS['formtype_mail_x'], $EMAIL_VARS['formtype_mail_y']);
 
                $integrityCheck = $this->TYPO3_CONF_VARS['FE']['strictFormmail'];