1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-02 20:27:40 +02:00

[2.0.1] DefinitionCache related bug-fixes

- Fixed bug where manually modified definitions were not saved via cache (mostly harmless, except for the fact that it would be a little slower)
- Configuration objects with different serials do not clobber each others when revision numbers are unequal
. DefinitionCache keys reordered to reflect precedence: version number, hash, then revision number

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1204 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-06-23 14:05:09 +00:00
parent eee45fed37
commit dc0fb7d2b4
7 changed files with 78 additions and 20 deletions

View File

@@ -88,9 +88,18 @@ class HTMLPurifier_DefinitionCache_Serializer extends
* @note No trailing slash
*/
function generateDirectoryPath($config) {
$base = $this->generateBaseDirectoryPath($config);
return $base . '/' . $this->type;
}
/**
* Generates path to base directory that contains all definition type
* serials
*/
function generateBaseDirectoryPath($config) {
$base = $config->get('Cache', 'SerializerPath');
$base = is_null($base) ? dirname(__FILE__) . '/Serializer' : $base;
return $base . '/' . $this->type;
return $base;
}
/**