From 5a548fa3442b0f63e1c2ff892b93335487cd616c Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Thu, 26 Jul 2012 16:37:59 +0200 Subject: [PATCH] [feature/dic] Adjust cache driver class name for BC PHPBB3-10739 --- phpBB/includes/di/processor/config.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/di/processor/config.php b/phpBB/includes/di/processor/config.php index d9f866992e..45b750c31e 100644 --- a/phpBB/includes/di/processor/config.php +++ b/phpBB/includes/di/processor/config.php @@ -38,7 +38,7 @@ class phpbb_di_processor_config implements phpbb_di_processor_interface $container->setParameter('core.php_ext', $this->php_ext); $container->setParameter('core.table_prefix', $table_prefix); - $container->setParameter('cache.driver.class', $acm_type); + $container->setParameter('cache.driver.class', $this->fix_acm_type($acm_type)); $container->setParameter('dbal.driver.class', 'dbal_'.$dbms); $container->setParameter('dbal.dbhost', $dbhost); $container->setParameter('dbal.dbuser', $dbuser); @@ -49,4 +49,13 @@ class phpbb_di_processor_config implements phpbb_di_processor_interface $container->set('container', $container); } + + protected function fix_acm_type($acm_type) + { + if (preg_match('#^[a-z]+$#', $acm_type)) { + return 'phpbb_cache_driver_'.$acm_type; + } + + return $acm_type; + } }