[BUGFIX] error with ve_guestbook 99/29799/3
authortritum_rz <ralf.zimmermann@tritum.de>
Sat, 3 May 2014 10:26:11 +0000 (12:26 +0200)
committerRalf Zimmermann <ralf.zimmermann@tritum.de>
Sat, 3 May 2014 10:26:40 +0000 (12:26 +0200)
Resolves: #58447
Releases: 6.2, 4.7, 4.5
Change-Id: I57ef1e15a63bee92ab1d1072a78002d91d587e6c
Reviewed-on: https://review.typo3.org/29799
Reviewed-by: Ralf Zimmermann
Tested-by: Ralf Zimmermann
Classes/Extensions/class.tx_wtspamshield_ve_guestbook.php

index 3f06c86..66d2d2b 100644 (file)
@@ -126,12 +126,12 @@ class tx_wtspamshield_ve_guestbook extends tslib_pibase {
                        }
                        $error = $this->validate($validateArray);
 
-                               // 2c. Truncate ve_guestbook temp table
+                               // Truncate ve_guestbook temp table
                        if ($error) {
-                               mysql_query('TRUNCATE TABLE tx_wtspamshield_veguestbooktemp');
+                               $GLOBALS['TYPO3_DB']->exec_TRUNCATEquery('tx_wtspamshield_veguestbooktemp');
                        }
 
-                               // 2d. Redirect if error happens
+                               // Redirect if error happens
                        if (strlen($error) > 0) {
                                $saveData = array('tstamp' => time());
                                $obj->strEntryTable = 'tx_wtspamshield_veguestbooktemp';
@@ -159,7 +159,7 @@ class tx_wtspamshield_ve_guestbook extends tslib_pibase {
                $this->additionalValues['nameCheck']['name1'] = $fieldValues['firstname'];
                $this->additionalValues['nameCheck']['name2'] = $fieldValues['surname'];
 
-               $availableValidators =
+               $availableValidators = 
                        array(
                                'blacklistCheck',
                                'nameCheck',
@@ -189,4 +189,4 @@ if (defined('TYPO3_MODE')
        require_once ($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/wt_spamshield/Classes/Extensions/class.tx_wtspamshield_ve_guestbook.php']);
 }
 
-?>
\ No newline at end of file
+?>