ezpublish-legacy icon indicating copy to clipboard operation
ezpublish-legacy copied to clipboard

Fix EZP-22915: allow a list of extra directories to be deleted by eZDir::recursiveDelete()

Open guillaumelecerf opened this issue 10 years ago • 8 comments

Alternative solution, related to #1004.

49583e1 introduced an "egg or chicken" dilemma : when you use ezcache.php to clear the global ini cache, eZDir::recursiveDelete() will read the old settings from the cache, and may disallow you to clear the cache if your old settings disallow it.

https://jira.ez.no/browse/EZP-22915 PR: #981

guillaumelecerf avatar Jun 24 '14 17:06 guillaumelecerf

Ping @lolautruche Here is an alternative solution.

guillaumelecerf avatar Jun 24 '14 17:06 guillaumelecerf

To avoid having to deal with this, the setting could also be transformed into a config.php setting, this is where we usually place everything that needs to be known before eZIni is loaded and so on.

andrerom avatar Jun 27 '14 08:06 andrerom

@andrerom : I used to write such a patch, but the downside is that it can handle only one AllowedDeletionDir, where @lolautruche solution can define more than one.

@lolautruche : advice ?

guillaumelecerf avatar Jun 27 '14 12:06 guillaumelecerf

Ping

guillaumelecerf avatar Oct 05 '14 22:10 guillaumelecerf

What if the constant allows several paths separated by ';'? allows us to remove the ini setting causing this chicken egg problem.

On second thought now I don't see a problem removing it in a new version with bc note on it. @lolautruche ok?

andrerom avatar Oct 06 '14 12:10 andrerom

@andrerom : here is a new version, allowing extra directories, through a semicolon separated list @lolautruche : do you agree to completely remove the "ini version", and replace it with this "const version" ?

guillaumelecerf avatar Oct 07 '14 10:10 guillaumelecerf

Ping

guillaumelecerf avatar Oct 20 '14 10:10 guillaumelecerf

+1

but should also deprecate the ini setting and give reasoning for it (failing when clearing ini cache on changed settings), so both inline in ini file and in bc doc.

andrerom avatar Oct 20 '14 12:10 andrerom