1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

Merge remote-tracking branch 'phpbb/develop' into ticket/11574

* phpbb/develop: (130 commits)
  [ticket/11638] Changed the layout to match the other similar commits
  [ticket/11640] removed the space that I wonder what it was doing there.
  [ticket/11749] Move event after all template data has been defined
  [ticket/10917] Variable used only once so delete it
  [ticket/10917] Revert use of phpbb wrapper
  [ticket/11749] Template events for topic_list_row_pre/append
  [ticket/11749] PHP Events for viewforum.php
  [ticket/11749] PHP Events for search.php
  [ticket/11740] Update FAQ to include Ideas Centre
  [ticket/11062] If user's language is english there is no further work needed
  [ticket/11062] Load new strings from user's language file if provided
  [ticket/10917] Using phpbb wrapper
  [ticket/10917] Fixed notice that files are out of date when updating to an unreleased version
  [ticket/11741] Fix empty brackets and remove bullet
  [ticket/11638] Removed the unneeded reset.
  [ticket/11638] Use the $parse_flags like the other commits
  [ticket/11638] Reverted to use the $parse tags way as the other ones
  [ticket/11638] Updated: bitwise $parse_flags use optionset()
  [ticket/11656] Made the check for the bitfield just like other PR's
  [ticket/11667] Use @inheritdoc
  ...
This commit is contained in:
Joas Schilling
2013-07-30 01:06:11 +02:00
72 changed files with 2164 additions and 557 deletions

View File

@@ -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;
@@ -87,7 +86,6 @@ class install_update extends module
$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/';
@@ -199,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']),
@@ -208,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))
@@ -230,7 +224,14 @@ class install_update extends module
if ($this->test_update === false)
{
// 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);
@@ -284,7 +285,7 @@ class install_update extends module
));
// 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']);
}