[FOLLOWUP][CLEANUP] Early returns for DataHandler::copyRecord() and friends 99/40299/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Tue, 16 Jun 2015 13:42:28 +0000 (15:42 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 16 Jun 2015 13:49:10 +0000 (15:49 +0200)
A missing parenthesis destroys the boolean logic so a
couple of functional tests fail.

Related: #67336
Releases: master
Change-Id: I4544ebf5b339d85f65bcf2aa1fa03daf39c7b656
Reviewed-on: http://review.typo3.org/40299
Reviewed-by: Daniel Maier <dani-maier@gmx.de>
Tested-by: Daniel Maier <dani-maier@gmx.de>
Reviewed-by: Andreas Wolf <andreas.wolf@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/DataHandling/DataHandler.php

index 43d6982..ed21460 100644 (file)
@@ -3266,7 +3266,7 @@ class DataHandler {
 
                $fullLanguageCheckNeeded = $table != 'pages';
                //Used to check language and general editing rights
-               if ($language <= 0 || !$this->BE_USER->checkLanguageAccess($language) && !$this->BE_USER->recordEditAccessInternals($table, $uid, FALSE, FALSE, $fullLanguageCheckNeeded)) {
+               if (($language <= 0 || !$this->BE_USER->checkLanguageAccess($language)) && !$this->BE_USER->recordEditAccessInternals($table, $uid, FALSE, FALSE, $fullLanguageCheckNeeded)) {
                        if ($this->enableLogging) {
                                $this->log($table, $uid, 3, 0, 1, 'Attempt to copy record without having permissions to do so. [' . $this->BE_USER->errorMsg . '].');
                        }