ezpublish-legacy
ezpublish-legacy copied to clipboard
Fix EZP-22915: allow a list of extra directories to be deleted by eZDir::recursiveDelete()
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
Ping @lolautruche Here is an alternative solution.
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 : 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 ?
Ping
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 : 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" ?
Ping
+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.