Fixed bug #9705: Moving page in WS will hide it from editors due to missing access...
authorIngo Renner <ingo.renner@typo3.org>
Tue, 20 Jan 2009 12:00:51 +0000 (12:00 +0000)
committerIngo Renner <ingo.renner@typo3.org>
Tue, 20 Jan 2009 12:00:51 +0000 (12:00 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-2@4788 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tcemain.php

index 37432f2..a56a674 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@
        * Fixed bug #10134: XSS vulnerability in sysext indexed_search (thanks to the TYPO3 Security Team and especially Marcus Krause)
        * Fixed bug #10133: Command execution in sysext indexed_search (thanks to the TYPO3 Security Team and especially Marcus Krause)
        * Fixed bug #10154: Weak encryption key generation vulnerability in sysext install (thanks to the TYPO3 Security Team, and especially Marcus Krause)
+       * Fixed bug #9705: Moving page in WS will hide it from editors due to missing access settings of placeholder (thanks to Franz-Xaver Koch and Michael Stucki)
 
 2009-01-19  Stanislas Rolland  <typo3@sjbr.ca>
 
index 8856081..1a85697 100755 (executable)
@@ -3436,6 +3436,16 @@ class t3lib_TCEmain      {
                                $newVersion_placeholderFieldArray[$TCA[$table]['ctrl']['tstamp']] = time();
                        }
 
+                               // Copy page access settings from original page to placeholder
+                       $perms_clause = $this->BE_USER->getPagePermsClause(1);
+                       $access = t3lib_BEfunc::readPageAccess($uid, $perms_clause);
+
+                       $newVersion_placeholderFieldArray['perms_userid']    = $access['perms_userid'];
+                       $newVersion_placeholderFieldArray['perms_groupid']   = $access['perms_groupid'];
+                       $newVersion_placeholderFieldArray['perms_user']      = $access['perms_user'];
+                       $newVersion_placeholderFieldArray['perms_group']     = $access['perms_group'];
+                       $newVersion_placeholderFieldArray['perms_everybody'] = $access['perms_everybody'];
+
                        $newVersion_placeholderFieldArray['t3ver_label'] = 'MOVE-TO PLACEHOLDER for #'.$uid;
                        $newVersion_placeholderFieldArray['t3ver_move_id'] = $uid;
                        $newVersion_placeholderFieldArray['t3ver_state'] = 3;   // Setting placeholder state value for temporary record