Fixed bug #12924: Bugfix: t3lib_tcemain checkFullLanguageAccess is too restrictive...
authorSteffen Kamper <info@sk-typo3.de>
Wed, 13 Jan 2010 23:26:22 +0000 (23:26 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Wed, 13 Jan 2010 23:26:22 +0000 (23:26 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6758 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tcemain.php
t3lib/class.t3lib_userauthgroup.php

index a857968..61c2ad1 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2010-01-13  Steffen Kamper  <info@sk-typo3.de>
 
+       * Fixed bug #12924: Bugfix: t3lib_tcemain checkFullLanguageAccess is too restrictive (Thanks to Tolleiv Nietsch)
        * Fixed bug #13211: Change focus to login field when OpenId is selected at login (Thanks to Steffen Gebert)
        * Follow-up to #12781: Bug: tceforms type do not work if the type field has l10n_mode == exclude (thanks to Fabrizio Branca)
 
index b80e911..5c5ebba 100644 (file)
@@ -2733,7 +2733,7 @@ class t3lib_TCEmain       {
                                // Now, the $uid is the actual record we will copy while $origUid is the record we asked to get copied - but that could be a live version.
 */
                        if ($this->doesRecordExist($table,$uid,'show')) {               // This checks if the record can be selected which is all that a copy action requires.
-                               if ($this->BE_USER->recordEditAccessInternals($table,$uid, false, false, true)) { //Used to check language and general editing rights
+                               if (($language > 0 && $this->BE_USER->checkLanguageAccess($language) ) || $this->BE_USER->recordEditAccessInternals($table, $uid, false, false, true)) { //Used to check language and general editing rights
                                        $data = Array();
 
                                        $nonFields = array_unique(t3lib_div::trimExplode(',','uid,perms_userid,perms_groupid,perms_user,perms_group,perms_everybody,t3ver_oid,t3ver_wsid,t3ver_id,t3ver_label,t3ver_state,t3ver_swapmode,t3ver_count,t3ver_stage,t3ver_tstamp,'.$excludeFields,1));
index cbd0684..6038246 100644 (file)
@@ -615,7 +615,7 @@ class t3lib_userAuthGroup extends t3lib_userAuth {
                                        if (!$this->checkLanguageAccess($idOrRow[$TCA[$table]['ctrl']['languageField']]))       {
                                                $this->errorMsg = 'ERROR: Language was not allowed.';
                                                return FALSE;
-                                       } elseif ($checkFullLanguageAccess && !$this->checkFullLanguagesAccess($table, $idOrRow)) {
+                                       } elseif ($checkFullLanguageAccess && $idOrRow[$TCA[$table]['ctrl']['languageField']]==0 && !$this->checkFullLanguagesAccess($table, $idOrRow)) {
                                                $this->errorMsg = 'ERROR: Related/affected language was not allowed.';
                                                return FALSE;
                                        }