[TYPO3-core] RFC #3977: Bugfix: Permissions not set on extracted localization-files

Lars Houmark lars at houmark.com
Sat Apr 24 22:53:55 CEST 2010


Hi Christian,

Christian Kuhn wrote:

>> Solution: Improve t3lib::fixPermissions with an extra parameter, that
>> makes it fix permissions recursively.
>
> Attached _v5 and _v5_test:

Nice work!

+1 on reading and testing with one problem. In t3lib_div::mkdir, you 
changed the return variable to $return, but the next line checks for 
$success, which was what I had named it. This means no "extra-second-run 
fixPermissions" is ever done on a file or folder. That extra run should 
not be needed, but it was added once, I guess for a reason, likely due 
to unstable chmod in the PHP mkdir function, so I guess we better keep 
it there.

Attached is a _v6 that has corrected the variable check.

> - fixPermissions() now returns a result (TRUE on win)
> - fixPermissions() checks for allowed path
> - fixPermissions() accepts a trailing slash for directories
> - fixPermissions() closes handles
> - fixPermissions() and mkdir() are now covered by unit tests
> - the em_index change doesn't add a trailing slash to l10n directory
> - the diff does not include cgl changes on unrelated things

I am having some serious issues with unit testing in general. I just 
cannot make it stable, no matter what I do.

I have tried different things, like changing my PHP version, and 
removing any accelerator caches, and just when it looks like things is 
running as they should, the tests fail.

So the test-cases I cannot give +1 for the above reason.

-- 
Lars Houmark

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 3977_v6.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100424/fdaf14c7/attachment.asc>


More information about the TYPO3-team-core mailing list