[TYPO3-core] RFC 15258: Creating multiple pages doesn't consider the group permissions for all pages

Helmut Hummel helmut at typo3.org
Sat Jul 31 00:06:05 CEST 2010


Hi Steffen,

On 30.07.10 22:58, Steffen Kamper wrote:
> 
> +1 by reading and testing.

-1 by reading and testing.

> As tcemain is a very sensible class here some more infos:
> 
> list($tscPID) = t3lib_BEfunc::getTSCpid($table,$id,$fieldArray['pid']);
> 
> this line is used for reading TSconfig from the parent page. only
> relevant infos that are read are TCEMAIN.permissions settings.

agreed.

> So intentionally this was meant: use the id of the new record. But then
> this should be used: $this->substNEWwithIDs[$old_pid_value] istead of
> the string.

agreed.

> But, this is wrong to. in the for-loop all records are on the same
> level, they are not child records. 

I disagree here. This is the case when you create multiple pages with
the "Functions" module, but tcemain is a general class, so you can
provide a datamap array with the intention to create multiple nested
pages. $old_pid_value would be correct for the check, if the to be
created page is a subpage of the previously created page.

Find attached another solution to this problem, which does the following:

1. Set $old_pid_value only if the to be created page should be created
inside of the previously created page.
This can be easily checked, because if the page shall be created after a
page, the pid is "negative". Otherwise the pid is "positive".

2. Set the "real pid" in this case, which is in
$this->substNEWwithIDs[$pid_value]


Regards Helmut
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 15258_v3_44.diff
Type: text/x-patch
Size: 1274 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100731/9a9d9038/attachment-0001.bin>


More information about the TYPO3-team-core mailing list