[ticket/14039] Fix constants for the updater

PHPBB3-14039
This commit is contained in:
Mate Bartus 2015-10-18 19:18:53 +02:00
parent d4dd112edf
commit 56093d1c82
2 changed files with 12 additions and 2 deletions

View file

@ -62,7 +62,6 @@ $phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relati
$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path; $phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path;
// Include files // Include files
phpbb_require_updated('includes/constants.' . $phpEx, $phpbb_root_path);
phpbb_require_updated('includes/functions.' . $phpEx, $phpbb_root_path); phpbb_require_updated('includes/functions.' . $phpEx, $phpbb_root_path);
phpbb_require_updated('includes/functions_content.' . $phpEx, $phpbb_root_path); phpbb_require_updated('includes/functions_content.' . $phpEx, $phpbb_root_path);
phpbb_include_updated('includes/functions_compatibility.' . $phpEx, $phpbb_root_path); phpbb_include_updated('includes/functions_compatibility.' . $phpEx, $phpbb_root_path);

View file

@ -133,7 +133,7 @@ class container_factory
$phpbb_container_builder = new \phpbb\di\container_builder($this->phpbb_root_path, $this->php_ext); $phpbb_container_builder = new \phpbb\di\container_builder($this->phpbb_root_path, $this->php_ext);
// For BC with functions that we need during install // For BC with functions that we need during install
global $phpbb_container; global $phpbb_container, $table_prefix;
$disable_super_globals = $this->request->super_globals_disabled(); $disable_super_globals = $this->request->super_globals_disabled();
@ -172,6 +172,7 @@ class container_factory
$this->container->compile(); $this->container->compile();
$phpbb_container = $this->container; $phpbb_container = $this->container;
$table_prefix = $phpbb_config_php_file->get('table_prefix');
// Restore super globals to previous state // Restore super globals to previous state
if ($disable_super_globals) if ($disable_super_globals)
@ -188,5 +189,15 @@ class container_factory
{ {
require($this->phpbb_root_path . 'includes/compatibility_globals.' . $this->php_ext); 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);
}
} }
} }