mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 16:56:44 +02:00
[ticket/11768] Removed the cached renderer
We don't need to cache an instance of the renderer, we can just instantiate it every time we need one. PHPBB3-11768
This commit is contained in:
@@ -314,13 +314,8 @@ class factory implements \phpbb\textformatter\cache
|
||||
// Cache the parser as-is
|
||||
$this->cache->put($this->cache_key_parser, $parser);
|
||||
|
||||
// We need to cache the name of the renderer's generated class so that we can load the class
|
||||
// before the renderer is unserialized. That's why we save them together, with the renderer
|
||||
// in serialized form
|
||||
$renderer_data = array(
|
||||
'class' => get_class($renderer),
|
||||
'renderer' => serialize($renderer)
|
||||
);
|
||||
// We need to cache the name of the renderer's generated class
|
||||
$renderer_data = array('class' => get_class($renderer));
|
||||
if (isset($censor))
|
||||
{
|
||||
$renderer_data['censor'] = $censor;
|
||||
|
@@ -77,7 +77,7 @@ class renderer extends \phpbb\textformatter\renderer
|
||||
|
||||
if (class_exists($class, false))
|
||||
{
|
||||
$renderer = unserialize($renderer_data['renderer']);
|
||||
$renderer = new $class;
|
||||
}
|
||||
|
||||
if (isset($renderer_data['censor']))
|
||||
|
Reference in New Issue
Block a user