mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-06 06:07:26 +02:00
[1.7.0] Change ->Revision member variable to a legit configuration directive. Start writing tutorial for customization.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1171 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -36,7 +36,7 @@ class HTMLPurifier_DefinitionCache
|
||||
*/
|
||||
function generateKey($config) {
|
||||
return $config->version . '-' . // possibly replace with function calls
|
||||
$config->revision . '-' .
|
||||
$config->get($this->type, 'DefinitionRev') . '-' .
|
||||
$config->getBatchSerial($this->type);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class HTMLPurifier_DefinitionCache
|
||||
list($version, $revision, $hash) = explode('-', $key, 3);
|
||||
$compare = version_compare($version, $config->version);
|
||||
if ($compare > 0) return false;
|
||||
if ($compare == 0 && $revision >= $config->revision) return false;
|
||||
if ($compare == 0 && $revision >= $config->get($this->type, 'DefinitionRev')) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user