aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMate Bartus <mate.bartus@gmail.com>2015-10-19 09:12:26 +0200
committerMate Bartus <mate.bartus@gmail.com>2015-10-19 09:12:26 +0200
commitd45f146814a1709a16fb8e4951374242d50b6aed (patch)
treedba85f796ac8831d32fcfb3cfd1c8a547ef3472e
parentde729110c8d723b64da333f515ba0acf2723c88c (diff)
downloadforums-d45f146814a1709a16fb8e4951374242d50b6aed.tar
forums-d45f146814a1709a16fb8e4951374242d50b6aed.tar.gz
forums-d45f146814a1709a16fb8e4951374242d50b6aed.tar.bz2
forums-d45f146814a1709a16fb8e4951374242d50b6aed.tar.xz
forums-d45f146814a1709a16fb8e4951374242d50b6aed.zip
[ticket/14039] Use update helper to include files in container factory
PHPBB3-14039
-rw-r--r--phpBB/config/installer/container/services_installer.yml1
-rw-r--r--phpBB/phpbb/install/helper/container_factory.php39
2 files changed, 16 insertions, 24 deletions
diff --git a/phpBB/config/installer/container/services_installer.yml b/phpBB/config/installer/container/services_installer.yml
index 10f9494aa1..667ff2bafd 100644
--- a/phpBB/config/installer/container/services_installer.yml
+++ b/phpBB/config/installer/container/services_installer.yml
@@ -61,6 +61,7 @@ services:
arguments:
- @language
- @request
+ - @installer.helper.update_helper
- %core.root_path%
- %core.php_ext%
diff --git a/phpBB/phpbb/install/helper/container_factory.php b/phpBB/phpbb/install/helper/container_factory.php
index bf19efe22e..6c1ecd2d02 100644
--- a/phpBB/phpbb/install/helper/container_factory.php
+++ b/phpBB/phpbb/install/helper/container_factory.php
@@ -41,6 +41,11 @@ class container_factory
protected $request;
/**
+ * @var update_helper
+ */
+ protected $update_helper;
+
+ /**
* The full phpBB container
*
* @var \Symfony\Component\DependencyInjection\ContainerInterface
@@ -50,15 +55,17 @@ class container_factory
/**
* Constructor
*
- * @param language $language Language service
- * @param request $request Request interface
- * @param string $phpbb_root_path Path to phpBB's root
- * @param string $php_ext Extension of PHP files
+ * @param language $language Language service
+ * @param request $request Request interface
+ * @param update_helper $update_helper Update helper
+ * @param string $phpbb_root_path Path to phpBB's root
+ * @param string $php_ext Extension of PHP files
*/
- public function __construct(language $language, request $request, $phpbb_root_path, $php_ext)
+ public function __construct(language $language, request $request, update_helper $update_helper, $phpbb_root_path, $php_ext)
{
$this->language = $language;
$this->request = $request;
+ $this->update_helper = $update_helper;
$this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext;
$this->container = null;
@@ -180,24 +187,8 @@ class container_factory
$this->request->disable_super_globals();
}
- // Get compatibilty globals
- if (file_exists($this->phpbb_root_path . 'install/update/new/includes/compatibility_globals.' . $this->php_ext))
- {
- require($this->phpbb_root_path . 'install/update/new/includes/compatibility_globals.' . $this->php_ext);
- }
- else
- {
- require($this->phpbb_root_path . 'includes/compatibility_globals.' . $this->php_ext);
- }
-
- // Get compatibilty globals
- if (file_exists($this->phpbb_root_path . 'install/update/new/includes/constants.' . $this->php_ext))
- {
- require($this->phpbb_root_path . 'install/update/new/includes/constants.' . $this->php_ext);
- }
- else
- {
- require($this->phpbb_root_path . 'includes/constants.' . $this->php_ext);
- }
+ // Get compatibilty globals and constants
+ $this->update_helper->include_file('includes/compatibility_globals.' . $this->php_ext);
+ $this->update_helper->include_file('includes/constants.' . $this->php_ext);
}
}