aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/adm/style/install_update_diff.html2
-rw-r--r--phpBB/docs/CHANGELOG.html2
-rw-r--r--phpBB/install/install_update.php38
-rwxr-xr-xphpBB/language/en/install.php2
4 files changed, 39 insertions, 5 deletions
diff --git a/phpBB/adm/style/install_update_diff.html b/phpBB/adm/style/install_update_diff.html
index 794d285574..54242d94b4 100644
--- a/phpBB/adm/style/install_update_diff.html
+++ b/phpBB/adm/style/install_update_diff.html
@@ -54,7 +54,7 @@ div#codepanel {
}
<!-- ENDIF -->
-<!-- IF not IS_DIFF_NEW_FILE -->
+<!-- IF not S_DIFF_NEW_FILE -->
/**
* Unified Diff
*/
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index d4f6a1149c..e2bb0a6ba1 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -187,6 +187,8 @@ p a {
<ul class="menu">
<li>[Fix] Re-allow searching within the memberlist</li>
<li>[Fix] Force prune related values to integers during conversions</li>
+ <li>[Fix] Updater now detects successfully merged files having conflicts and user chose to merge with modifications [Bug #12685]</li>
+ <li>[Fix] Updater is no longer listing missing language entries and styles if these had been removed [Bug #12655]</li>
</ul>
</div>
diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php
index 3a68e271ed..5c83ac2c67 100644
--- a/phpBB/install/install_update.php
+++ b/phpBB/install/install_update.php
@@ -776,11 +776,18 @@ class install_update extends module
global $phpbb_root_path, $template, $user;
$this->tpl_name = 'install_update_diff';
+
+ // Got the diff template itself updated? If so, we are able to directly use it
+ if (in_array('adm/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', '');
$file = request_var('file', '');
- $diff_mode = request_var('diff_mode', 'inline');
+ $diff_mode = request_var('diff_mode', 'side_by_side');
// First of all make sure the file is within our file update list with the correct status
$found_entry = array();
@@ -852,6 +859,8 @@ class install_update extends module
'S_DIFF_CONFLICT_FILE' => true,
'NUM_CONFLICTS' => $diff->merged_output(false, false, false, true))
);
+
+ $diff = $this->return_diff($phpbb_root_path . $file, $diff->merged_output());
break;
}
@@ -947,7 +956,11 @@ class install_update extends module
}
else
{
- $update_list['no_update'][] = $file;
+ // Do not include style-related or language-related content
+ if (strpos($file, 'styles/') !== 0 && strpos($file, 'language/') !== 0)
+ {
+ $update_list['no_update'][] = $file;
+ }
}
unset($this->update_info['files'][$index]);
}
@@ -1090,8 +1103,25 @@ class install_update extends module
if ($diff->merged_output(false, false, false, true))
{
$update_ary['conflicts'] = $diff->_conflicting_blocks;
- $update_list['conflict'][] = $update_ary;
+ // There is one special case... users having merged with a conflicting file... we need to check this
+ $tmp = array(
+ 'file1' => file_get_contents($phpbb_root_path . $file),
+ 'file2' => implode("\n", $diff->merged_orig_output()),
+ );
+
+ $diff = &new diff($tmp['file1'], $tmp['file2'], false);
+ $empty = $diff->is_empty();
+
+ if ($empty)
+ {
+ unset($update_ary['conflicts']);
+ unset($diff);
+ $update_list['up_to_date'][] = $update_ary;
+ return;
+ }
+
+ $update_list['conflict'][] = $update_ary;
unset($diff);
return;
@@ -1108,6 +1138,8 @@ class install_update extends module
if ($empty)
{
+ unset($diff);
+
$update_list['up_to_date'][] = $update_ary;
return;
}
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index 8f37b52c09..c81b5c9f7b 100755
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -394,7 +394,7 @@ $lang = array_merge($lang, array(
'FILE_DIFF_NOT_ALLOWED' => 'File not allowed to be diffed.',
'FILE_USED' => 'Information used from', // Single file
'FILES_CONFLICT' => 'Conflict files',
- 'FILES_CONFLICT_EXPLAIN' => 'The following files are modified and do not represent the original files from the old version. phpBB determined that these files create conflicts if they are tried to be merged. Please investigate the conflicts and try to manually resolve them or continue the update choosing the preferred merging method. If you resolve the conflicts manually check the files again after you modified the them. You are also able to choose between the preferred merge method for every file. The first one will result in a file where the conflicting lines from your old file will be lost, the other one will result in loosing the changes from the newer file.',
+ 'FILES_CONFLICT_EXPLAIN' => 'The following files are modified and do not represent the original files from the old version. phpBB determined that these files create conflicts if they are tried to be merged. Please investigate the conflicts and try to manually resolve them or continue the update choosing the preferred merging method. If you resolve the conflicts manually check the files again after you modified them. You are also able to choose between the preferred merge method for every file. The first one will result in a file where the conflicting lines from your old file will be lost, the other one will result in loosing the changes from the newer file.',
'FILES_MODIFIED' => 'Modified files',
'FILES_MODIFIED_EXPLAIN' => 'The following files are modified and do not represent the original files from the old version. The updated file will be a merge between your modifications and the new file.',
'FILES_NEW' => 'New files',