mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-12 03:34:04 +02:00
Merge remote-tracking branch 'github-phpbb/develop' into ticket/11700
* github-phpbb/develop: (586 commits) [ticket/11735] Display disabled checkbox in subsilver for read notifications [ticket/11735] Display disabled checkbox when notification is already read [ticket/11844] update acp/authentication language var [ticket/11795] Remove PM popup [ticket/11795] Remove outdated comment from forum_fn.js [ticket/11795] Move find user JS to forum_fn [ticket/11795] Replace TWIG with phpBB syntax in ACP [ticket/11795] Move MSN scripts to forum_fn.js [ticket/11795] Use phpBB template syntax instead of TWIG [ticket/11795] Move PM popup JS to forum_fn.js [ticket/11795] Get rid of pagination JS variables [ticket/11795] Get rid of onload_functions [ticket/11795] Use data-reset-on-edit attr to reset elements [ticket/11795] Redo form elements auto-focus [ticket/11811] Remove outline on :focus [ticket/11836] Fix subsilver fatal error [ticket/11837] Replace escaped single quote with utf-8 single quote [ticket/11836] Fix fatal error on unsupported provider for auth link [ticket/11837] Translate UCP_AUTH_LINK_NOT_SUPPORTED [ticket/11809] Ensure code.js is first script included after jQuery ... Conflicts: phpBB/config/services.yml phpBB/develop/create_schema_files.php phpBB/develop/mysql_upgrader.php phpBB/download/file.php phpBB/includes/bbcode.php phpBB/includes/functions_container.php phpBB/install/database_update.php phpBB/install/index.php phpBB/phpbb/controller/helper.php phpBB/phpbb/controller/resolver.php phpBB/phpbb/request/request_interface.php phpBB/phpbb/session.php phpBB/phpbb/style/extension_path_provider.php phpBB/phpbb/style/path_provider.php phpBB/phpbb/style/path_provider_interface.php phpBB/phpbb/style/resource_locator.php phpBB/phpbb/style/style.php phpBB/phpbb/template/locator.php phpBB/phpbb/template/template.php phpBB/phpbb/template/twig/node/includeasset.php phpBB/phpbb/template/twig/node/includecss.php phpBB/phpbb/template/twig/node/includejs.php phpBB/phpbb/template/twig/twig.php tests/controller/helper_url_test.php tests/di/create_container_test.php tests/extension/style_path_provider_test.php tests/notification/notification_test.php tests/session/continue_test.php tests/session/creation_test.php tests/template/template_events_test.php tests/template/template_test_case.php tests/template/template_test_case_with_tree.php tests/test_framework/phpbb_functional_test_case.php
This commit is contained in:
@@ -21,26 +21,6 @@ define('IN_INSTALL', true);
|
||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
|
||||
if (!function_exists('phpbb_require_updated'))
|
||||
{
|
||||
function phpbb_require_updated($path, $optional = false)
|
||||
{
|
||||
global $phpbb_root_path;
|
||||
|
||||
$new_path = $phpbb_root_path . 'install/update/new/' . $path;
|
||||
$old_path = $phpbb_root_path . $path;
|
||||
|
||||
if (file_exists($new_path))
|
||||
{
|
||||
require($new_path);
|
||||
}
|
||||
else if (!$optional || file_exists($old_path))
|
||||
{
|
||||
require($old_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function phpbb_end_update($cache, $config)
|
||||
{
|
||||
$cache->purge();
|
||||
@@ -69,7 +49,7 @@ function phpbb_end_update($cache, $config)
|
||||
exit_handler();
|
||||
}
|
||||
|
||||
phpbb_require_updated('includes/startup.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/startup.' . $phpEx);
|
||||
|
||||
include($phpbb_root_path . 'config.' . $phpEx);
|
||||
if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type))
|
||||
@@ -88,7 +68,9 @@ require($phpbb_root_path . 'includes/functions.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/functions_content.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/functions_container.' . $phpEx);
|
||||
|
||||
require($phpbb_root_path . 'config.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/constants.' . $phpEx);
|
||||
include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
|
||||
|
||||
// Set PHP error handler to ours
|
||||
@@ -101,11 +83,10 @@ $phpbb_class_loader->register();
|
||||
// Set up container (must be done here because extensions table may not exist)
|
||||
$container_extensions = array(
|
||||
new \phpbb\di\extension\config($phpbb_root_path . 'config.' . $phpEx),
|
||||
new \phpbb\di\extension\core($phpbb_root_path),
|
||||
new \phpbb\di\extension\core($phpbb_root_path . 'config/'),
|
||||
);
|
||||
$container_passes = array(
|
||||
new \phpbb\di\pass\collection_pass(),
|
||||
//new \phpbb\di\pass\kernel_pass(),
|
||||
);
|
||||
$phpbb_container = phpbb_create_container($container_extensions, $phpbb_root_path, $phpEx);
|
||||
|
||||
@@ -263,8 +244,8 @@ while (!$migrator->finished())
|
||||
// Are we approaching the time limit? If so we want to pause the update and continue after refreshing
|
||||
if ((time() - $update_start_time) >= $safe_time_limit)
|
||||
{
|
||||
echo $user->lang['DATABASE_UPDATE_NOT_COMPLETED'] . '<br />';
|
||||
echo '<a href="' . append_sid($phpbb_root_path . 'install/database_update.' . $phpEx, 'type=' . $request->variable('type', 0) . '&language=' . $user->lang['USER_LANG']) . '">' . $user->lang['DATABASE_UPDATE_CONTINUE'] . '</a>';
|
||||
echo '<br />' . $user->lang['DATABASE_UPDATE_NOT_COMPLETED'] . '<br /><br />';
|
||||
echo '<a href="' . append_sid($phpbb_root_path . 'install/database_update.' . $phpEx, 'type=' . $request->variable('type', 0) . '&language=' . $request->variable('language', 'en')) . '" class="button1">' . $user->lang['DATABASE_UPDATE_CONTINUE'] . '</a>';
|
||||
|
||||
phpbb_end_update($cache, $config);
|
||||
}
|
||||
@@ -280,7 +261,7 @@ echo $user->lang['DATABASE_UPDATE_COMPLETE'] . '<br />';
|
||||
if ($request->variable('type', 0))
|
||||
{
|
||||
echo $user->lang['INLINE_UPDATE_SUCCESSFUL'] . '<br /><br />';
|
||||
echo '<a href="' . append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=update&sub=file_check&language=' . $user->lang['USER_LANG']) . '" class="button1">' . $user->lang['CONTINUE_UPDATE_NOW'] . '</a>';
|
||||
echo '<a href="' . append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=update&sub=update_db&language=' . $request->variable('language', 'en')) . '" class="button1">' . $user->lang['CONTINUE_UPDATE_NOW'] . '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -28,7 +28,7 @@ if (version_compare(PHP_VERSION, '5.3.3') < 0)
|
||||
|
||||
function phpbb_require_updated($path, $optional = false)
|
||||
{
|
||||
global $phpbb_root_path;
|
||||
global $phpbb_root_path, $table_prefix;
|
||||
|
||||
$new_path = $phpbb_root_path . 'install/update/new/' . $path;
|
||||
$old_path = $phpbb_root_path . $path;
|
||||
@@ -43,6 +43,23 @@ function phpbb_require_updated($path, $optional = false)
|
||||
}
|
||||
}
|
||||
|
||||
function phpbb_include_updated($path, $optional = false)
|
||||
{
|
||||
global $phpbb_root_path;
|
||||
|
||||
$new_path = $phpbb_root_path . 'install/update/new/' . $path;
|
||||
$old_path = $phpbb_root_path . $path;
|
||||
|
||||
if (file_exists($new_path))
|
||||
{
|
||||
include($new_path);
|
||||
}
|
||||
else if (!$optional || file_exists($old_path))
|
||||
{
|
||||
include($old_path);
|
||||
}
|
||||
}
|
||||
|
||||
phpbb_require_updated('includes/startup.' . $phpEx);
|
||||
|
||||
// Try to override some limits - maybe it helps some...
|
||||
@@ -78,19 +95,22 @@ $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;
|
||||
|
||||
// Include essential scripts
|
||||
require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx);
|
||||
phpbb_require_updated('phpbb/class_loader.' . $phpEx);
|
||||
|
||||
require($phpbb_root_path . 'includes/functions.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/functions_container.' . $phpEx);
|
||||
phpbb_require_updated('includes/functions.' . $phpEx);
|
||||
phpbb_require_updated('includes/functions_container.' . $phpEx);
|
||||
|
||||
phpbb_require_updated('includes/functions_content.' . $phpEx, true);
|
||||
|
||||
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
include($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/functions_install.' . $phpEx);
|
||||
phpbb_include_updated('includes/functions_admin.' . $phpEx);
|
||||
phpbb_include_updated('includes/utf/utf_normalizer.' . $phpEx);
|
||||
phpbb_include_updated('includes/utf/utf_tools.' . $phpEx);
|
||||
phpbb_require_updated('includes/functions_install.' . $phpEx);
|
||||
|
||||
// Setup class loader first
|
||||
$phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx);
|
||||
$phpbb_class_loader_new = new \phpbb\class_loader('phpbb_', "{$phpbb_root_path}install/update/new/phpbb/", $phpEx);
|
||||
$phpbb_class_loader_new->register();
|
||||
$phpbb_class_loader = new \phpbb\class_loader('phpbb_', "{$phpbb_root_path}phpbb/", $phpEx);
|
||||
$phpbb_class_loader->register();
|
||||
$phpbb_class_loader_ext = new \phpbb\class_loader('phpbb_ext_', "{$phpbb_root_path}ext/", $phpEx);
|
||||
$phpbb_class_loader_ext->register();
|
||||
@@ -108,7 +128,7 @@ $request = $phpbb_container->get('request');
|
||||
request_var('', 0, false, false, $request); // "dependency injection" for a function
|
||||
|
||||
// Try and load an appropriate language if required
|
||||
$language = basename(request_var('language', ''));
|
||||
$language = basename($request->variable('language', ''));
|
||||
|
||||
if ($request->header('Accept-Language') && !$language)
|
||||
{
|
||||
@@ -167,11 +187,23 @@ if (!file_exists($phpbb_root_path . 'language/' . $language) || !is_dir($phpbb_r
|
||||
}
|
||||
|
||||
// And finally, load the relevant language files
|
||||
include($phpbb_root_path . 'language/' . $language . '/common.' . $phpEx);
|
||||
include($phpbb_root_path . 'language/' . $language . '/acp/common.' . $phpEx);
|
||||
include($phpbb_root_path . 'language/' . $language . '/acp/board.' . $phpEx);
|
||||
include($phpbb_root_path . 'language/' . $language . '/install.' . $phpEx);
|
||||
include($phpbb_root_path . 'language/' . $language . '/posting.' . $phpEx);
|
||||
$load_lang_files = array('common', 'acp/common', 'acp/board', 'install', 'posting');
|
||||
$new_path = $phpbb_root_path . 'install/update/new/language/' . $language . '/';
|
||||
$old_path = $phpbb_root_path . 'language/' . $language . '/';
|
||||
|
||||
// NOTE: we can not use "phpbb_include_updated" as the files uses vars which would be required
|
||||
// to be global while loading.
|
||||
foreach ($load_lang_files as $lang_file)
|
||||
{
|
||||
if (file_exists($new_path . $lang_file . '.' . $phpEx))
|
||||
{
|
||||
include($new_path . $lang_file . '.' . $phpEx);
|
||||
}
|
||||
else
|
||||
{
|
||||
include($old_path . $lang_file . '.' . $phpEx);
|
||||
}
|
||||
}
|
||||
|
||||
// usually we would need every single constant here - and it would be consistent. For 3.0.x, use a dirty hack... :(
|
||||
|
||||
@@ -181,8 +213,8 @@ define('CHMOD_READ', 4);
|
||||
define('CHMOD_WRITE', 2);
|
||||
define('CHMOD_EXECUTE', 1);
|
||||
|
||||
$mode = request_var('mode', 'overview');
|
||||
$sub = request_var('sub', '');
|
||||
$mode = $request->variable('mode', 'overview');
|
||||
$sub = $request->variable('sub', '');
|
||||
|
||||
// Set PHP error handler to ours
|
||||
set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler');
|
||||
@@ -212,12 +244,20 @@ $config = new \phpbb\config\config(array(
|
||||
'load_tplcompile' => '1'
|
||||
));
|
||||
|
||||
<<<<<<< HEAD
|
||||
$phpbb_style_resource_locator = new \phpbb\style\resource_locator();
|
||||
$phpbb_style_path_provider = new \phpbb\style\path_provider();
|
||||
$template = new \phpbb\template\twig\twig($phpbb_root_path, $phpEx, $config, $user, new \phpbb\template\context());
|
||||
$phpbb_style = new \phpbb\style\style($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider, $template);
|
||||
$phpbb_style->set_ext_dir_prefix('adm/');
|
||||
$phpbb_style->set_custom_style('admin', $phpbb_admin_path . 'style', array(), '');
|
||||
=======
|
||||
$template = new phpbb_template_twig($phpbb_root_path, $phpEx, $config, $user, new phpbb_template_context());
|
||||
$paths = array($phpbb_root_path . 'install/update/new/adm/style', $phpbb_admin_path . 'style');
|
||||
$paths = array_filter($paths, 'is_dir');
|
||||
$template->set_custom_style('adm', $paths);
|
||||
|
||||
>>>>>>> github-phpbb/develop
|
||||
$template->assign_var('T_ASSETS_PATH', '../assets');
|
||||
$template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style');
|
||||
|
||||
|
@@ -39,7 +39,7 @@ if (!empty($setmodules))
|
||||
'module_filename' => substr(basename(__FILE__), 0, -strlen($phpEx)-1),
|
||||
'module_order' => 30,
|
||||
'module_subs' => '',
|
||||
'module_stages' => array('INTRO', 'VERSION_CHECK', 'UPDATE_DB', 'FILE_CHECK', 'UPDATE_FILES'),
|
||||
'module_stages' => array('INTRO', 'VERSION_CHECK', 'FILE_CHECK', 'UPDATE_FILES', 'UPDATE_DB'),
|
||||
'module_reqs' => ''
|
||||
);
|
||||
}
|
||||
@@ -57,7 +57,6 @@ class install_update extends module
|
||||
var $new_location;
|
||||
var $latest_version;
|
||||
var $current_version;
|
||||
var $unequal_version;
|
||||
|
||||
var $update_to_version;
|
||||
|
||||
@@ -71,18 +70,22 @@ class install_update extends module
|
||||
|
||||
function main($mode, $sub)
|
||||
{
|
||||
global $phpbb_style, $template, $phpEx, $phpbb_root_path, $user, $db, $config, $cache, $auth, $language;
|
||||
global $template, $phpEx, $phpbb_root_path, $user, $db, $config, $cache, $auth, $language;
|
||||
global $request, $phpbb_admin_path, $phpbb_adm_relative_path, $phpbb_container;
|
||||
|
||||
// We must enable super globals, otherwise creating a new instance of the request class,
|
||||
// using the new container with a dbal connection will fail with the following PHP Notice:
|
||||
// Object of class phpbb_request_deactivated_super_global could not be converted to int
|
||||
$request->enable_super_globals();
|
||||
|
||||
// Create a normal container now
|
||||
$phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx);
|
||||
$phpbb_container = phpbb_create_update_container($phpbb_root_path, $phpEx, $phpbb_root_path . 'install/update/new/config');
|
||||
|
||||
// Writes into global $cache
|
||||
$cache = $phpbb_container->get('cache');
|
||||
|
||||
$this->tpl_name = 'install_update';
|
||||
$this->page_title = 'UPDATE_INSTALLATION';
|
||||
$this->unequal_version = false;
|
||||
|
||||
$this->old_location = $phpbb_root_path . 'install/update/old/';
|
||||
$this->new_location = $phpbb_root_path . 'install/update/new/';
|
||||
@@ -125,7 +128,7 @@ class install_update extends module
|
||||
$config['default_lang'] = $language;
|
||||
$user->data['user_lang'] = $language;
|
||||
|
||||
$user->setup(array('common', 'acp/common', 'acp/board', 'install', 'posting'));
|
||||
$user->add_lang(array('common', 'acp/common', 'acp/board', 'install', 'posting'));
|
||||
|
||||
// Reset the default_lang
|
||||
$config['default_lang'] = $config_default_lang;
|
||||
@@ -138,7 +141,9 @@ class install_update extends module
|
||||
}
|
||||
|
||||
// Set custom template again. ;)
|
||||
$phpbb_style->set_custom_style('admin', $phpbb_admin_path . 'style', array(), '');
|
||||
$paths = array($phpbb_root_path . 'install/update/new/adm/style', $phpbb_admin_path . 'style');
|
||||
$paths = array_filter($paths, 'is_dir');
|
||||
$template->set_custom_style('adm', $paths);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_USER_LANG' => $user->lang['USER_LANG'],
|
||||
@@ -192,8 +197,6 @@ class install_update extends module
|
||||
// Check if the update files are actually meant to update from the current version
|
||||
if ($this->current_version != $this->update_info['version']['from'])
|
||||
{
|
||||
$this->unequal_version = true;
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_ERROR' => true,
|
||||
'ERROR_MSG' => sprintf($user->lang['INCOMPATIBLE_UPDATE_FILES'], $this->current_version, $this->update_info['version']['from'], $this->update_info['version']['to']),
|
||||
@@ -201,10 +204,8 @@ class install_update extends module
|
||||
}
|
||||
|
||||
// Check if the update files stored are for the latest version...
|
||||
if ($this->latest_version != $this->update_info['version']['to'])
|
||||
if (version_compare(strtolower($this->latest_version), strtolower($this->update_info['version']['to']), '>'))
|
||||
{
|
||||
$this->unequal_version = true;
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_WARNING' => true,
|
||||
'WARNING_MSG' => sprintf($user->lang['OLD_UPDATE_FILES'], $this->update_info['version']['from'], $this->update_info['version']['to'], $this->latest_version))
|
||||
@@ -222,14 +223,15 @@ class install_update extends module
|
||||
|
||||
if ($this->test_update === false)
|
||||
{
|
||||
// Got the updater template itself updated? If so, we are able to directly use it - but only if all three files are present
|
||||
if (in_array($phpbb_adm_relative_path . 'style/install_update.html', $this->update_info['files']))
|
||||
{
|
||||
$this->tpl_name = '../../install/update/new/adm/style/install_update';
|
||||
}
|
||||
|
||||
// What about the language file? Got it updated?
|
||||
if (in_array('language/en/install.' . $phpEx, $this->update_info['files']))
|
||||
if (in_array('language/' . $language . '/install.' . $phpEx, $this->update_info['files']))
|
||||
{
|
||||
$lang = array();
|
||||
include($this->new_location . 'language/' . $language . '/install.' . $phpEx);
|
||||
// this is the user's language.. just merge it
|
||||
$user->lang = array_merge($user->lang, $lang);
|
||||
}
|
||||
if ($language != 'en' && in_array('language/en/install.' . $phpEx, $this->update_info['files']))
|
||||
{
|
||||
$lang = array();
|
||||
include($this->new_location . 'language/en/install.' . $phpEx);
|
||||
@@ -273,18 +275,17 @@ class install_update extends module
|
||||
$this->page_title = 'STAGE_VERSION_CHECK';
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_UP_TO_DATE' => $up_to_date,
|
||||
'S_VERSION_CHECK' => true,
|
||||
|
||||
'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=file_check"),
|
||||
'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_db"),
|
||||
'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=file_check"),
|
||||
|
||||
'S_UP_TO_DATE' => $up_to_date,
|
||||
'LATEST_VERSION' => $this->latest_version,
|
||||
'CURRENT_VERSION' => $this->current_version)
|
||||
);
|
||||
'CURRENT_VERSION' => $this->current_version,
|
||||
));
|
||||
|
||||
// Print out version the update package updates to
|
||||
if ($this->unequal_version)
|
||||
if ($this->latest_version != $this->update_info['version']['to'])
|
||||
{
|
||||
$template->assign_var('PACKAGE_VERSION', $this->update_info['version']['to']);
|
||||
}
|
||||
@@ -302,30 +303,6 @@ class install_update extends module
|
||||
break;
|
||||
|
||||
case 'update_db':
|
||||
|
||||
// Make sure the database update is valid for the latest version
|
||||
$valid = false;
|
||||
$updates_to_version = '';
|
||||
|
||||
if (file_exists($phpbb_root_path . 'install/database_update.' . $phpEx))
|
||||
{
|
||||
include_once($phpbb_root_path . 'install/database_update.' . $phpEx);
|
||||
|
||||
if ($updates_to_version === $this->update_info['version']['to'])
|
||||
{
|
||||
$valid = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Should not happen at all
|
||||
if (!$valid)
|
||||
{
|
||||
trigger_error($user->lang['DATABASE_UPDATE_INFO_OLD'], E_USER_ERROR);
|
||||
}
|
||||
|
||||
// Just a precaution
|
||||
$cache->purge();
|
||||
|
||||
// Redirect the user to the database update script with some explanations...
|
||||
$template->assign_vars(array(
|
||||
'S_DB_UPDATE' => true,
|
||||
@@ -333,8 +310,14 @@ class install_update extends module
|
||||
'U_DB_UPDATE' => append_sid($phpbb_root_path . 'install/database_update.' . $phpEx, 'type=1&language=' . $user->data['user_lang']),
|
||||
'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_db"),
|
||||
'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=file_check"),
|
||||
'L_EVERYTHING_UP_TO_DATE' => $user->lang('EVERYTHING_UP_TO_DATE', append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'), append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login&redirect=' . $phpbb_adm_relative_path . 'index.php%3Fi=send_statistics%26mode=send_statistics')),
|
||||
));
|
||||
|
||||
// Do not display incompatible package note after successful update
|
||||
if ($config['version'] == $this->update_info['version']['to'])
|
||||
{
|
||||
$template->assign_var('S_ERROR', false);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'file_check':
|
||||
@@ -500,17 +483,30 @@ class install_update extends module
|
||||
$template->assign_vars(array(
|
||||
'S_FILE_CHECK' => true,
|
||||
'S_ALL_UP_TO_DATE' => $all_up_to_date,
|
||||
'L_ALL_FILES_UP_TO_DATE' => $user->lang('ALL_FILES_UP_TO_DATE', append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'), append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login&redirect=' . $phpbb_adm_relative_path . 'index.php%3Fi=send_statistics%26mode=send_statistics')),
|
||||
'S_VERSION_UP_TO_DATE' => $up_to_date,
|
||||
'S_UP_TO_DATE' => $up_to_date,
|
||||
'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=file_check"),
|
||||
'U_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_files"),
|
||||
'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_db"),
|
||||
));
|
||||
|
||||
// Since some people try to update to RC releases, but phpBB.com tells them the last version is the version they currently run
|
||||
// we are faced with the updater thinking the database schema is up-to-date; which it is, but should be updated none-the-less
|
||||
// We now try to cope with this by triggering the update process
|
||||
if (version_compare(str_replace('rc', 'RC', strtolower($this->current_version)), str_replace('rc', 'RC', strtolower($this->update_info['version']['to'])), '<'))
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_UP_TO_DATE' => false,
|
||||
));
|
||||
}
|
||||
|
||||
if ($all_up_to_date)
|
||||
{
|
||||
global $phpbb_container;
|
||||
$phpbb_log = $phpbb_container->get('log');
|
||||
|
||||
// Add database update to log
|
||||
add_log('admin', 'LOG_UPDATE_PHPBB', $this->current_version, $this->update_to_version);
|
||||
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_UPDATE_PHPBB', time(), array($this->current_version, $this->update_to_version));
|
||||
|
||||
$db->sql_return_on_error(true);
|
||||
$db->sql_query('DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'version_update_from'");
|
||||
@@ -1089,12 +1085,6 @@ class install_update extends module
|
||||
|
||||
$this->tpl_name = 'install_update_diff';
|
||||
|
||||
// Got the diff template itself updated? If so, we are able to directly use it
|
||||
if (in_array($phpbb_adm_relative_path . 'style/install_update_diff.html', $this->update_info['files']))
|
||||
{
|
||||
$this->tpl_name = '../../install/update/new/adm/style/install_update_diff';
|
||||
}
|
||||
|
||||
$this->page_title = 'VIEWING_FILE_DIFF';
|
||||
|
||||
$status = request_var('status', '');
|
||||
|
@@ -128,6 +128,27 @@ CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users(user_id);;
|
||||
CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users(auth_option_id);;
|
||||
CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users(auth_role_id);;
|
||||
|
||||
# Table: 'phpbb_oauth_tokens'
|
||||
CREATE TABLE phpbb_oauth_tokens (
|
||||
user_id INTEGER DEFAULT 0 NOT NULL,
|
||||
session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
|
||||
provider VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
|
||||
oauth_token BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL
|
||||
);;
|
||||
|
||||
CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens(user_id);;
|
||||
CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens(provider);;
|
||||
|
||||
# Table: 'phpbb_oauth_accounts'
|
||||
CREATE TABLE phpbb_oauth_accounts (
|
||||
user_id INTEGER DEFAULT 0 NOT NULL,
|
||||
provider VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
|
||||
oauth_provider_id BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
|
||||
);;
|
||||
|
||||
ALTER TABLE phpbb_oauth_accounts ADD PRIMARY KEY (user_id, provider);;
|
||||
|
||||
|
||||
# Table: 'phpbb_banlist'
|
||||
CREATE TABLE phpbb_banlist (
|
||||
ban_id INTEGER NOT NULL,
|
||||
|
@@ -166,6 +166,43 @@ CREATE INDEX [auth_role_id] ON [phpbb_acl_users]([auth_role_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
||||
/*
|
||||
Table: 'phpbb_oauth_tokens'
|
||||
*/
|
||||
CREATE TABLE [phpbb_oauth_tokens] (
|
||||
[user_id] [int] DEFAULT (0) NOT NULL ,
|
||||
[session_id] [char] (32) DEFAULT ('') NOT NULL ,
|
||||
[provider] [varchar] (255) DEFAULT ('') NOT NULL ,
|
||||
[oauth_token] [text] DEFAULT ('') NOT NULL
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [user_id] ON [phpbb_oauth_tokens]([user_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [provider] ON [phpbb_oauth_tokens]([provider]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
||||
/*
|
||||
Table: 'phpbb_oauth_accounts'
|
||||
*/
|
||||
CREATE TABLE [phpbb_oauth_accounts] (
|
||||
[user_id] [int] DEFAULT (0) NOT NULL ,
|
||||
[provider] [varchar] (255) DEFAULT ('') NOT NULL ,
|
||||
[oauth_provider_id] [varchar] (4000) DEFAULT ('') NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_oauth_accounts] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_oauth_accounts] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[user_id],
|
||||
[provider]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
||||
/*
|
||||
Table: 'phpbb_banlist'
|
||||
*/
|
||||
|
@@ -90,6 +90,26 @@ CREATE TABLE phpbb_acl_users (
|
||||
);
|
||||
|
||||
|
||||
# Table: 'phpbb_oauth_tokens'
|
||||
CREATE TABLE phpbb_oauth_tokens (
|
||||
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
session_id binary(32) DEFAULT '' NOT NULL,
|
||||
provider varbinary(255) DEFAULT '' NOT NULL,
|
||||
oauth_token mediumblob NOT NULL,
|
||||
KEY user_id (user_id),
|
||||
KEY provider (provider)
|
||||
);
|
||||
|
||||
|
||||
# Table: 'phpbb_oauth_accounts'
|
||||
CREATE TABLE phpbb_oauth_accounts (
|
||||
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
provider varbinary(255) DEFAULT '' NOT NULL,
|
||||
oauth_provider_id blob NOT NULL,
|
||||
PRIMARY KEY (user_id, provider)
|
||||
);
|
||||
|
||||
|
||||
# Table: 'phpbb_banlist'
|
||||
CREATE TABLE phpbb_banlist (
|
||||
ban_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||
|
@@ -90,6 +90,26 @@ CREATE TABLE phpbb_acl_users (
|
||||
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
|
||||
|
||||
|
||||
# Table: 'phpbb_oauth_tokens'
|
||||
CREATE TABLE phpbb_oauth_tokens (
|
||||
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
session_id char(32) DEFAULT '' NOT NULL,
|
||||
provider varchar(255) DEFAULT '' NOT NULL,
|
||||
oauth_token mediumtext NOT NULL,
|
||||
KEY user_id (user_id),
|
||||
KEY provider (provider)
|
||||
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
|
||||
|
||||
|
||||
# Table: 'phpbb_oauth_accounts'
|
||||
CREATE TABLE phpbb_oauth_accounts (
|
||||
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
provider varchar(255) DEFAULT '' NOT NULL,
|
||||
oauth_provider_id text NOT NULL,
|
||||
PRIMARY KEY (user_id, provider)
|
||||
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
|
||||
|
||||
|
||||
# Table: 'phpbb_banlist'
|
||||
CREATE TABLE phpbb_banlist (
|
||||
ban_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||
|
@@ -210,6 +210,34 @@ CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id)
|
||||
CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id)
|
||||
/
|
||||
|
||||
/*
|
||||
Table: 'phpbb_oauth_tokens'
|
||||
*/
|
||||
CREATE TABLE phpbb_oauth_tokens (
|
||||
user_id number(8) DEFAULT '0' NOT NULL,
|
||||
session_id char(32) DEFAULT '' ,
|
||||
provider varchar2(255) DEFAULT '' ,
|
||||
oauth_token clob DEFAULT ''
|
||||
)
|
||||
/
|
||||
|
||||
CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id)
|
||||
/
|
||||
CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider)
|
||||
/
|
||||
|
||||
/*
|
||||
Table: 'phpbb_oauth_accounts'
|
||||
*/
|
||||
CREATE TABLE phpbb_oauth_accounts (
|
||||
user_id number(8) DEFAULT '0' NOT NULL,
|
||||
provider varchar2(255) DEFAULT '' ,
|
||||
oauth_provider_id clob DEFAULT '' ,
|
||||
CONSTRAINT pk_phpbb_oauth_accounts PRIMARY KEY (user_id, provider)
|
||||
)
|
||||
/
|
||||
|
||||
|
||||
/*
|
||||
Table: 'phpbb_banlist'
|
||||
*/
|
||||
|
@@ -188,6 +188,30 @@ CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id);
|
||||
CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id);
|
||||
CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id);
|
||||
|
||||
/*
|
||||
Table: 'phpbb_oauth_tokens'
|
||||
*/
|
||||
CREATE TABLE phpbb_oauth_tokens (
|
||||
user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
|
||||
session_id char(32) DEFAULT '' NOT NULL,
|
||||
provider varchar(255) DEFAULT '' NOT NULL,
|
||||
oauth_token TEXT DEFAULT '' NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id);
|
||||
CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider);
|
||||
|
||||
/*
|
||||
Table: 'phpbb_oauth_accounts'
|
||||
*/
|
||||
CREATE TABLE phpbb_oauth_accounts (
|
||||
user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
|
||||
provider varchar(255) DEFAULT '' NOT NULL,
|
||||
oauth_provider_id varchar(4000) DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (user_id, provider)
|
||||
);
|
||||
|
||||
|
||||
/*
|
||||
Table: 'phpbb_banlist'
|
||||
*/
|
||||
|
@@ -101,6 +101,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_function_nam
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_max_chunk_size', '50');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_package_size', '20');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_confirm', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_mod_rewrite', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_pm_icons', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_post_confirm', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_enable', '1');
|
||||
@@ -170,7 +171,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('limit_search_load'
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_anon_lastread', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_birthdays', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_memberlist', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_profile', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_pm', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewprofile', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewtopic', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_lastread', '1');
|
||||
|
@@ -89,6 +89,26 @@ CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id);
|
||||
CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id);
|
||||
CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id);
|
||||
|
||||
# Table: 'phpbb_oauth_tokens'
|
||||
CREATE TABLE phpbb_oauth_tokens (
|
||||
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
session_id char(32) NOT NULL DEFAULT '',
|
||||
provider varchar(255) NOT NULL DEFAULT '',
|
||||
oauth_token mediumtext(16777215) NOT NULL DEFAULT ''
|
||||
);
|
||||
|
||||
CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id);
|
||||
CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider);
|
||||
|
||||
# Table: 'phpbb_oauth_accounts'
|
||||
CREATE TABLE phpbb_oauth_accounts (
|
||||
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
provider varchar(255) NOT NULL DEFAULT '',
|
||||
oauth_provider_id text(65535) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (user_id, provider)
|
||||
);
|
||||
|
||||
|
||||
# Table: 'phpbb_banlist'
|
||||
CREATE TABLE phpbb_banlist (
|
||||
ban_id INTEGER PRIMARY KEY NOT NULL ,
|
||||
|
Reference in New Issue
Block a user