diff options
author | Igor Wiedler <igor@wiedler.ch> | 2012-07-26 16:37:59 +0200 |
---|---|---|
committer | Igor Wiedler <igor@wiedler.ch> | 2012-07-26 17:02:07 +0200 |
commit | 5a548fa3442b0f63e1c2ff892b93335487cd616c (patch) | |
tree | 1a9ce57c92b98d1b2d4c97cd4b0a226ce36a03a4 | |
parent | 5cdcaaa5318c05a04c544eeb25ced571737c2ce3 (diff) | |
download | forums-5a548fa3442b0f63e1c2ff892b93335487cd616c.tar forums-5a548fa3442b0f63e1c2ff892b93335487cd616c.tar.gz forums-5a548fa3442b0f63e1c2ff892b93335487cd616c.tar.bz2 forums-5a548fa3442b0f63e1c2ff892b93335487cd616c.tar.xz forums-5a548fa3442b0f63e1c2ff892b93335487cd616c.zip |
[feature/dic] Adjust cache driver class name for BC
PHPBB3-10739
-rw-r--r-- | phpBB/includes/di/processor/config.php | 11 |
1 files changed, 10 insertions, 1 deletions
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; + } } |