mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 22:08:54 +00:00
fixing bugs within the updater...
git-svn-id: file:///svn/phpbb/trunk@7798 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
2ed2996ebf
commit
28521e5568
4 changed files with 39 additions and 5 deletions
|
@ -54,7 +54,7 @@ div#codepanel {
|
|||
}
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF not IS_DIFF_NEW_FILE -->
|
||||
<!-- IF not S_DIFF_NEW_FILE -->
|
||||
/**
|
||||
* Unified Diff
|
||||
*/
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Add table
Reference in a new issue