From 06caac044479c3ff41f48157f40e8cb00e3d5e84 Mon Sep 17 00:00:00 2001
From: Joas Schilling <nickvergessen@gmx.de>
Date: Mon, 10 Jun 2013 13:48:21 +0200
Subject: [ticket/11574] Try to load updated service.yml before the default one

PHPBB3-11574
---
 phpBB/includes/di/extension/core.php | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/phpBB/includes/di/extension/core.php b/phpBB/includes/di/extension/core.php
index 9c36ba2fc4..d0a3ebdf99 100644
--- a/phpBB/includes/di/extension/core.php
+++ b/phpBB/includes/di/extension/core.php
@@ -51,8 +51,16 @@ class phpbb_di_extension_core extends Extension
 	*/
 	public function load(array $config, ContainerBuilder $container)
 	{
-		$loader = new YamlFileLoader($container, new FileLocator(phpbb_realpath($this->root_path . 'config')));
-		$loader->load('services.yml');
+		if (file_exists($this->root_path . 'install/update/new/config/services.yml'))
+		{
+			$loader = new YamlFileLoader($container, new FileLocator(phpbb_realpath($this->root_path . 'install/update/new/config')));
+			$loader->load('services.yml');
+		}
+		else if (file_exists($this->root_path . 'config/services.yml'))
+		{
+			$loader = new YamlFileLoader($container, new FileLocator(phpbb_realpath($this->root_path . 'config')));
+			$loader->load('services.yml');
+		}
 	}
 
 	/**
-- 
cgit v1.2.1