mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 16:56:44 +02:00
Merge branch '3.2.x'
This commit is contained in:
4
phpBB/phpbb/cache/driver/redis.php
vendored
4
phpBB/phpbb/cache/driver/redis.php
vendored
@@ -137,6 +137,10 @@ class redis extends \phpbb\cache\driver\memory
|
||||
*/
|
||||
function _write($var, $data, $ttl = 2592000)
|
||||
{
|
||||
if ($ttl == 0)
|
||||
{
|
||||
return $this->redis->set($var, $data);
|
||||
}
|
||||
return $this->redis->setex($var, $ttl, $data);
|
||||
}
|
||||
|
||||
|
@@ -521,7 +521,9 @@ class factory implements \phpbb\textformatter\cache_interface
|
||||
protected function extract_templates($template)
|
||||
{
|
||||
// Capture the template fragments
|
||||
preg_match_all('#<!-- BEGIN (.*?) -->(.*?)<!-- END .*? -->#s', $template, $matches, PREG_SET_ORDER);
|
||||
// Allow either phpBB template or the Twig syntax
|
||||
preg_match_all('#<!-- BEGIN (.*?) -->(.*?)<!-- END .*? -->#s', $template, $matches, PREG_SET_ORDER) ?:
|
||||
preg_match_all('#{% for (.*?) in .*? %}(.*?){% endfor %}#s', $template, $matches, PREG_SET_ORDER);
|
||||
|
||||
$fragments = array();
|
||||
foreach ($matches as $match)
|
||||
|
Reference in New Issue
Block a user