aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/adm/style/install_update.html237
-rw-r--r--phpBB/docs/CHANGELOG.html3
-rw-r--r--phpBB/includes/diff/diff.php57
-rw-r--r--phpBB/includes/diff/renderer.php2
-rw-r--r--phpBB/install/install_update.php50
-rw-r--r--phpBB/language/en/install.php14
6 files changed, 231 insertions, 132 deletions
diff --git a/phpBB/adm/style/install_update.html b/phpBB/adm/style/install_update.html
index c0dc185361..a5a0f8b5b6 100644
--- a/phpBB/adm/style/install_update.html
+++ b/phpBB/adm/style/install_update.html
@@ -192,94 +192,170 @@
<form id="install_update" method="post" action="{U_UPDATE_ACTION}">
- <!-- IF .files -->
- <!-- BEGIN files -->
- <!-- IF files.S_STATUS -->
- <!-- IF not files.S_FIRST_ROW -->
- </fieldset></div>
+ <!-- IF .up_to_date -->
+ <h2>{L_FILES_UP_TO_DATE}</h2>
+ <p>{L_FILES_UP_TO_DATE_EXPLAIN}</p>
+
+ <fieldset>
+ <legend><img src="{T_IMAGE_PATH}file_up_to_date.gif" alt="{L_STATUS_UP_TO_DATE}" /></legend>
+ <!-- BEGIN up_to_date -->
+ <dl>
+ <dd class="full" style="text-align: left;"><strong>{up_to_date.FILENAME}</strong></dd>
+ </dl>
+ <!-- END up_to_date -->
+ </fieldset>
+
+ <!-- ENDIF -->
+
+ <!-- IF .new -->
+ <h2>{L_FILES_NEW}</h2>
+ <p>{L_FILES_NEW_EXPLAIN}</p>
+
+ <fieldset>
+ <legend><img src="{T_IMAGE_PATH}file_new.gif" alt="{L_STATUS_NEW}" /></legend>
+ <!-- BEGIN new -->
+ <dl>
+ <dt style="width: 60%;"><strong><!-- IF new.DIR_PART -->{new.DIR_PART}<br /><!-- ENDIF -->{new.FILE_PART}</strong>
+ <!-- IF new.S_CUSTOM --><br /><span><em>{L_FILE_USED}: </em>{new.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
+ </dt>
+ <dd style="margin-left: 60%;">
+ <!-- IF not new.S_BINARY -->[ <a href="{new.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{new.L_SHOW_DIFF}</a>
+ <!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF -->
+ </dd>
+ <!-- IF new.S_CUSTOM -->
+ <dd style="margin-left: 60%;"><label><input type="checkbox" name="no_update[]" value="{new.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
+ <!-- ENDIF -->
+ </dl>
+ <!-- END new -->
+ </fieldset>
+
+ <!-- ENDIF -->
+
+ <!-- IF .not_modified -->
+ <h2>{L_FILES_NOT_MODIFIED}</h2>
+ <div style="float: {S_CONTENT_FLOW_END};">&raquo; <a href="#" onclick="dE('not_modified', 0); return false;">{L_TOGGLE_DISPLAY}</a></div>
+ <p>{L_FILES_NOT_MODIFIED_EXPLAIN}</p>
+
+ <fieldset id="not_modified" style="display: none;">
+ <legend><img src="{T_IMAGE_PATH}file_not_modified.gif" alt="{L_STATUS_NOT_MODIFIED}" /></legend>
+ <!-- BEGIN not_modified -->
+ <dl>
+ <dt style="width: 60%;"><strong><!-- IF not_modified.DIR_PART -->{not_modified.DIR_PART}<br /><!-- ENDIF -->{not_modified.FILE_PART}</strong>
+ <!-- IF not_modified.S_CUSTOM --><br /><span><em>{L_FILE_USED}: </em>{not_modified.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
+ </dt>
+ <dd style="margin-left: 60%;"><!-- IF not not_modified.S_BINARY -->[ <a href="{not_modified.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{not_modified.L_SHOW_DIFF}</a> ]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF --></dd>
+ <!-- IF not_modified.S_CUSTOM -->
+ <dd style="margin-left: 60%;"><label><input type="checkbox" name="no_update[]" value="{not_modified.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
<!-- ENDIF -->
+ </dl>
+ <!-- END not_modified -->
+ </fieldset>
- <h2>{files.TITLE}</h2>
+ <!-- ENDIF -->
- <!-- IF files.STATUS eq 'not_modified' --><div style="float: {S_CONTENT_FLOW_END};">&raquo; <a href="#" onclick="dE('not_modified', 0); return false;">{L_TOGGLE_DISPLAY}</a></div><!-- ENDIF -->
- <p>{files.EXPLAIN}</p>
+ <!-- IF .modified -->
+ <h2>{L_FILES_MODIFIED}</h2>
+ <p>{L_FILES_MODIFIED_EXPLAIN}</p>
+
+ <!-- BEGIN modified -->
+ <fieldset>
+ <legend><img src="{T_IMAGE_PATH}file_modified.gif" alt="{L_STATUS_MODIFIED}" /></legend>
+ <dl>
+ <dt style="width: 60%;"><strong><!-- IF modified.DIR_PART -->{modified.DIR_PART}<br /><!-- ENDIF -->{modified.FILE_PART}</strong>
+ <!-- IF modified.S_CUSTOM --><br /><span><em>{L_FILE_USED}: </em>{modified.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
+ </dt>
+ <dd style="margin-left: 60%;">&nbsp;</dd>
+ <!-- IF modified.S_CUSTOM -->
+ <dd style="margin-left: 60%;"><label><input type="checkbox" name="no_update[]" value="{modified.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
+ <!-- ENDIF -->
+ </dl>
+ <dl>
+ <dt style="width: 60%"><label><input type="radio" class="radio" name="modified[{modified.FILENAME}]" value="0" checked="checked" /> {L_MERGE_MODIFICATIONS_OPTION}</label></dt>
+ <dd style="margin-left: 60%;"><!-- IF not modified.S_BINARY -->[ <a href="{modified.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{modified.L_SHOW_DIFF}</a> ]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF --></dd>
+ </dl>
+ <dl>
+ <dt style="width: 60%"><label><input type="radio" class="radio" name="modified[{modified.FILENAME}]" value="1" /> {L_MERGE_NO_MERGE_NEW_OPTION}</label></dt>
+ <dd style="margin-left: 60%;"><!-- IF not modified.S_BINARY -->[<a href="{modified.U_VIEW_NO_MERGE_NEW}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE -->&nbsp;<!-- ENDIF --></dd>
+ </dl>
+ <dl>
+ <dt style="width: 60%"><label><input type="radio" class="radio" name="modified[{modified.FILENAME}]" value="2" /> {L_MERGE_NO_MERGE_MOD_OPTION}</label></dt>
+ <dd style="margin-left: 60%;"><!-- IF not modified.S_BINARY -->[<a href="{modified.U_VIEW_NO_MERGE_MOD}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE -->&nbsp;<!-- ENDIF --></dd>
+ </dl>
+ </fieldset>
+ <!-- END modified -->
- <div style="display: <!-- IF files.STATUS neq 'not_modified' -->block<!-- ELSE -->none<!-- ENDIF -->;" id="{files.STATUS}">
+ <!-- ENDIF -->
- <fieldset>
- <legend><img src="{T_IMAGE_PATH}file_{files.STATUS}.gif" alt="{files.L_STATUS}" /></legend>
+ <!-- IF .new_conflict -->
+ <h2>{L_FILES_NEW_CONFLICT}</h2>
+ <p>{L_FILES_NEW_CONFLICT_EXPLAIN}</p>
+
+ <fieldset>
+ <legend><img src="{T_IMAGE_PATH}file_new_conflict.gif" alt="{L_STATUS_NEW_CONFLICT}" /></legend>
+ <!-- BEGIN new_conflict -->
+ <dl>
+ <dt style="width: 60%;"><strong><!-- IF new_conflict.DIR_PART -->{new_conflict.DIR_PART}<br /><!-- ENDIF -->{new_conflict.FILE_PART}</strong>
+ <!-- IF new_conflict.S_CUSTOM --><br /><span><em>{L_FILE_USED}: </em>{new_conflict.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
+ </dt>
+ <dd style="margin-left: 60%;">
+ <!-- IF not new_conflict.S_BINARY -->[ <a href="{new_conflict.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{new_conflict.L_SHOW_DIFF}</a>
+ <!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF -->
+ </dd>
+ <!-- IF new_conflict.S_CUSTOM -->
+ <dd style="margin-left: 60%;"><label><input type="checkbox" name="no_update[]" value="{new_conflict.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
+ <!-- ENDIF -->
+ </dl>
+ <!-- END new_conflict -->
+ </fieldset>
+
+ <!-- ENDIF -->
+
+ <!-- IF .conflict -->
+ <h2>{L_FILES_CONFLICT}</h2>
+ <p>{L_FILES_CONFLICT_EXPLAIN}</p>
+
+ <!-- BEGIN conflict -->
+ <fieldset>
+ <legend><img src="{T_IMAGE_PATH}file_conflict.gif" alt="{L_STATUS_CONFLICT}" /></legend>
+ <dl>
+ <dt style="width: 60%;"><strong><!-- IF conflict.DIR_PART -->{conflict.DIR_PART}<br /><!-- ENDIF -->{conflict.FILE_PART}</strong>
+ <!-- IF conflict.S_CUSTOM --><br /><span><em>{L_FILE_USED}: </em>{conflict.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
+ <!-- IF conflict.NUM_CONFLICTS --><br /><span>{L_NUM_CONFLICTS}: {conflict.NUM_CONFLICTS}</span><!-- ENDIF -->
+ </dt>
+ <dd style="margin-left: 60%;">
+ <!-- IF not conflict.S_BINARY -->[ <a href="{conflict.U_SHOW_DIFF}">{L_DOWNLOAD_CONFLICTS}</a> ]<br />{L_DOWNLOAD_CONFLICTS_EXPLAIN}
+ <!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF -->
+ </dd>
+ <!-- IF conflict.S_CUSTOM -->
+ <dd style="margin-left: 60%;"><label><input type="checkbox" name="no_update[]" value="{conflict.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
+ <!-- ENDIF -->
+ </dl>
+ <!-- IF conflict.S_BINARY -->
+ <dl>
+ <dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="1" checked="checked" /> {L_MERGE_NO_MERGE_NEW_OPTION}</label></dt>
+ <dd style="margin-left: 60%;">&nbsp;</dd>
+ </dl>
<!-- ELSE -->
<dl>
- <!-- IF files.STATUS eq 'up_to_date' -->
- <dd class="full" style="text-align: left;"><strong>{files.FILENAME}</strong></dd>
- <!-- ELSE -->
- <dt style="width: 60%;">
- <strong><!-- IF files.DIR_PART -->{files.DIR_PART}<br /><!-- ENDIF -->{files.FILE_PART}</strong>
- <!-- IF files.S_CUSTOM -->
- <br /><span><em>{L_FILE_USED}: </em>{files.CUSTOM_ORIGINAL}</span>
- <!-- ENDIF -->
- <!-- IF files.NUM_CONFLICTS -->
- <br /><span>{L_NUM_CONFLICTS}: {files.NUM_CONFLICTS}</span>
- <!-- ENDIF -->
- </dt>
- <dd style="margin-left: 60%;"><!-- IF files.STATUS eq 'modified' -->&nbsp;<!-- ELSE --><!-- IF not files.S_BINARY -->[ <a href="{files.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{files.L_SHOW_DIFF}</a> ]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF --><!-- ENDIF --></dd>
- <!-- IF files.S_CUSTOM -->
- <dd style="margin-left: 60%;"><label><input type="checkbox" name="no_update[]" value="{files.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
- <!-- ENDIF -->
-
- <!-- IF files.STATUS eq 'modified' -->
- </dl>
- <dl>
- <dt style="width: 60%"><label><input type="radio" class="radio" name="modified[{files.FILENAME}]" value="0" checked="checked" /> {L_MERGE_MODIFICATIONS_OPTION}</label></dt>
- <dd style="margin-left: 60%;"><!-- IF not files.S_BINARY -->[ <a href="{files.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{files.L_SHOW_DIFF}</a> ]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF --></dd>
- </dl>
- <dl>
- <dt style="width: 60%"><label><input type="radio" class="radio" name="modified[{files.FILENAME}]" value="1" /> {L_MERGE_NO_MERGE_NEW_OPTION}</label></dt>
- <dd style="margin-left: 60%;"><!-- IF not files.S_BINARY -->[<a href="{files.U_VIEW_NO_MERGE_NEW}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE -->&nbsp;<!-- ENDIF --></dd>
- </dl>
- <dl>
- <dt style="width: 60%"><label><input type="radio" class="radio" name="modified[{files.FILENAME}]" value="2" /> {L_MERGE_NO_MERGE_MOD_OPTION}</label></dt>
- <dd style="margin-left: 60%;"><!-- IF not files.S_BINARY -->[<a href="{files.U_VIEW_NO_MERGE_MOD}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE -->&nbsp;<!-- ENDIF --></dd>
- </dl>
- <!-- IF not files.S_LAST_ROW -->
- </fieldset>
-
- <fieldset>
- <legend><img src="{T_IMAGE_PATH}file_{files.STATUS}.gif" alt="{files.L_STATUS}" /></legend>
- <!-- ENDIF -->
-
- <!-- ENDIF -->
-
- <!-- IF files.STATUS eq 'conflict' -->
- </dl>
- <dl>
- <dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{files.FILENAME}]" value="1" checked="checked" /> {L_MERGE_NO_MERGE_NEW_OPTION}</label></dt>
- <dd style="margin-left: 60%;"><!-- IF not files.S_BINARY -->[<a href="{files.U_VIEW_NO_MERGE_NEW}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE -->&nbsp;<!-- ENDIF --></dd>
- </dl>
- <!-- IF not files.S_BINARY -->
- <dl>
- <dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{files.FILENAME}]" value="3" /> {L_MERGE_NEW_FILE_OPTION}</label></dt>
- <dd style="margin-left: 60%;">[<a href="{files.U_VIEW_NEW_FILE}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
- </dl>
- <dl>
- <dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{files.FILENAME}]" value="4" /> {L_MERGE_MOD_FILE_OPTION}</label></dt>
- <dd style="margin-left: 60%;">[<a href="{files.U_VIEW_MOD_FILE}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
- </dl>
- <!-- ENDIF -->
- <!-- IF not files.S_LAST_ROW -->
- </fieldset>
-
- <fieldset>
- <legend><img src="{T_IMAGE_PATH}file_{files.STATUS}.gif" alt="{files.L_STATUS}" /></legend>
- <!-- ENDIF -->
-
- <!-- ENDIF -->
- <!-- ENDIF -->
- <!-- IF files.STATUS neq 'conflict' and files.STATUS neq 'modified' --></dl><!-- ENDIF -->
+ <dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="3" checked="checked" /> {L_MERGE_NEW_FILE_OPTION}</label></dt>
+ <dd style="margin-left: 60%;">[<a href="{conflict.U_VIEW_NEW_FILE}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_MODIFIED}</a>]</dd>
+ </dl>
+ <dl>
+ <dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="4" /> {L_MERGE_MOD_FILE_OPTION}</label></dt>
+ <dd style="margin-left: 60%;">[<a href="{conflict.U_VIEW_MOD_FILE}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_MODIFIED}</a>]</dd>
+ </dl>
+ <dl>
+ <dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="1" /> {L_MERGE_NO_MERGE_NEW_OPTION}</label></dt>
+ <dd style="margin-left: 60%;">[<a href="{conflict.U_VIEW_NO_MERGE_NEW}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
+ </dl>
+ <dl>
+ <dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="2" /> {L_MERGE_NO_MERGE_MOD_OPTION}</label></dt>
+ <dd style="margin-left: 60%;">[<a href="{conflict.U_VIEW_NO_MERGE_MOD}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
+ </dl>
<!-- ENDIF -->
- <!-- END files -->
+ </fieldset>
+ <!-- END conflict -->
- </fieldset></div>
<!-- ENDIF -->
<br />
@@ -371,7 +447,6 @@
<div class="errorbox">
<p>{L_CONNECTION_FAILED}<br />{ERROR_MSG}</p>
</div>
-
<!-- ENDIF -->
<fieldset>
@@ -387,7 +462,7 @@
</dl>
<!-- END data -->
</fieldset>
-
+
<fieldset class="submit-buttons">
{S_HIDDEN_FIELDS}
<input class="button2" type="submit" name="check_again" value="{L_BACK}" />
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 282e3cf31f..d24b512709 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -89,6 +89,9 @@
<ul>
<li>[Fix] Delete user entry from ban list table upon user deletion (Bug #40015 - Patch by TerraFrost)</li>
<li>[Fix] Missing read permission from calls to phpbb_chmod()</li>
+ <li>[Change] Allow download of conflicting file for later reference in automatic updater</li>
+ <li>[Change] Default difference view is now 'inline' instead of 'side by side'</li>
+ <li>[Change] Added new option for merging differences to conflicting files in automatic updater</li>
</ul>
<a name="v303"></a><h3>1.ii. Changes since 3.0.3</h3>
diff --git a/phpBB/includes/diff/diff.php b/phpBB/includes/diff/diff.php
index bc99ebdd85..70a4166b9c 100644
--- a/phpBB/includes/diff/diff.php
+++ b/phpBB/includes/diff/diff.php
@@ -107,7 +107,7 @@ class diff
*
* Example:
* <code>
- * $diff = new diff($lines1, $lines2);
+ * $diff = &new diff($lines1, $lines2);
* $rev = $diff->reverse();
* </code>
*
@@ -469,33 +469,37 @@ class diff3 extends diff
}
/**
- * Return merged output
+ * Return number of conflicts
+ */
+ function get_num_conflicts()
+ {
+ $conflicts = 0;
+
+ foreach ($this->_edits as $edit)
+ {
+ if ($edit->is_conflict())
+ {
+ $conflicts++;
+ }
+ }
+
+ return $conflicts;
+ }
+
+ /**
+ * Get conflicts content for download. This is generally a merged file, but preserving conflicts and adding explanations to it.
+ * A user could then go through this file, search for the conflicts and changes the code accordingly.
*
* @param string $label1 the cvs file version/label from the original set of lines
* @param string $label2 the cvs file version/label from the new set of lines
* @param string $label_sep the explanation between label1 and label2 - more of a helper for the user
- * @param bool $get_conflicts if set to true only the number of conflicts is returned
- * @param bool $merge_new if set to true the merged output will have the new file contents on a conflicting merge
*
* @return mixed the merged output
*/
- function merged_output($label1 = 'CURRENT_FILE', $label2 = 'NEW_FILE', $label_sep = 'DIFF_SEP_EXPLAIN', $get_conflicts = false, $merge_new = false)
+ function get_conflicts_content($label1 = 'CURRENT_FILE', $label2 = 'NEW_FILE', $label_sep = 'DIFF_SEP_EXPLAIN')
{
global $user;
- if ($get_conflicts)
- {
- foreach ($this->_edits as $edit)
- {
- if ($edit->is_conflict())
- {
- $this->_conflicting_blocks++;
- }
- }
-
- return $this->_conflicting_blocks;
- }
-
$label1 = (!empty($user->lang[$label1])) ? $user->lang[$label1] : $label1;
$label2 = (!empty($user->lang[$label2])) ? $user->lang[$label2] : $label2;
$label_sep = (!empty($user->lang[$label_sep])) ? $user->lang[$label_sep] : $label_sep;
@@ -506,15 +510,12 @@ class diff3 extends diff
{
if ($edit->is_conflict())
{
- if (!$merge_new)
- {
- $lines = array_merge($lines, array('<<<<<<<' . ($label1 ? ' ' . $label1 : '')), $edit->final1, array('=======' . ($label_sep ? ' ' . $label_sep : '')), $edit->final2, array('>>>>>>>' . ($label2 ? ' ' . $label2 : '')));
- }
- else
- {
- $lines = array_merge($lines, $edit->final1);
- }
- $this->_conflicting_blocks++;
+ // Start conflict label
+ $label_start = array('<<< ' . $label1);
+ $label_mid = array('=== ' . $label_sep);
+ $label_end = array('>>> ' . $label2);
+
+ $lines = array_merge($lines, $label_start, $edit->final1, $label_mid, $edit->final2, $label_end);
}
else
{
@@ -821,4 +822,4 @@ class diff3_block_builder
}
}
-?> \ No newline at end of file
+?>
diff --git a/phpBB/includes/diff/renderer.php b/phpBB/includes/diff/renderer.php
index 02fb6ccc37..9144e0ab82 100644
--- a/phpBB/includes/diff/renderer.php
+++ b/phpBB/includes/diff/renderer.php
@@ -857,4 +857,4 @@ class diff_renderer_side_by_side extends diff_renderer
}
-?> \ No newline at end of file
+?>
diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php
index 8ff7427b09..978b4cfe8d 100644
--- a/phpBB/install/install_update.php
+++ b/phpBB/install/install_update.php
@@ -371,14 +371,14 @@ class install_update extends module
continue;
}
- $template->assign_block_vars('files', array(
+/* $template->assign_block_vars('files', array(
'S_STATUS' => true,
'STATUS' => $status,
'L_STATUS' => $user->lang['STATUS_' . strtoupper($status)],
'TITLE' => $user->lang['FILES_' . strtoupper($status)],
'EXPLAIN' => $user->lang['FILES_' . strtoupper($status) . '_EXPLAIN'],
)
- );
+ );*/
foreach ($filelist as $file_struct)
{
@@ -398,7 +398,7 @@ class install_update extends module
$diff_url = append_sid($this->p_master->module_url, "mode=$mode&amp;sub=file_check&amp;action=diff&amp;status=$status&amp;file=" . urlencode($file_struct['filename']));
- $template->assign_block_vars('files', array(
+ $template->assign_block_vars($status, array(
'STATUS' => $status,
'FILENAME' => $filename,
@@ -685,7 +685,7 @@ class install_update extends module
default:
$diff = $this->return_diff($this->old_location . $original_filename, $phpbb_root_path . $file_struct['filename'], $this->new_location . $original_filename);
- $contents = implode("\n", $diff->merged_output());
+ $contents = implode("\n", $diff->merged_new_output());
unset($diff);
break;
}
@@ -1053,7 +1053,7 @@ class install_update extends module
$status = request_var('status', '');
$file = request_var('file', '');
- $diff_mode = request_var('diff_mode', 'side_by_side');
+ $diff_mode = request_var('diff_mode', 'inline');
// First of all make sure the file is within our file update list with the correct status
$found_entry = array();
@@ -1097,9 +1097,7 @@ class install_update extends module
break;
- case MERGE_NEW_FILE:
- case MERGE_MOD_FILE:
-
+/*
$diff = $this->return_diff($this->old_location . $original_file, $phpbb_root_path . $file, $this->new_location . $original_file);
$tmp = array(
@@ -1116,17 +1114,37 @@ class install_update extends module
$this->page_title = 'VIEWING_FILE_CONTENTS';
break;
-
- default:
+*/
+ // Merge differences and use new phpBB code for conflicted blocks
+ case MERGE_NEW_FILE:
+ case MERGE_MOD_FILE:
$diff = $this->return_diff($this->old_location . $original_file, $phpbb_root_path . $file, $this->new_location . $original_file);
$template->assign_vars(array(
'S_DIFF_CONFLICT_FILE' => true,
- 'NUM_CONFLICTS' => $diff->merged_output(false, false, false, true))
+ 'NUM_CONFLICTS' => $diff->get_num_conflicts())
);
- $diff = $this->return_diff($phpbb_root_path . $file, $diff->merged_output());
+ $diff = $this->return_diff($phpbb_root_path . $file, ($option == MERGE_NEW_FILE) ? $diff->merged_new_output() : $diff->merged_orig_output());
+ break;
+
+ // Download conflict file
+ default:
+
+ $diff = $this->return_diff($this->old_location . $original_file, $phpbb_root_path . $file, $this->new_location . $original_file);
+
+ header('Pragma: no-cache');
+ header("Content-Type: application/octetstream; name=\"$file\"");
+ header("Content-disposition: attachment; filename=$file");
+
+ @set_time_limit(0);
+
+ echo implode("\n", $diff->get_conflicts_content());
+
+ flush();
+ exit;
+
break;
}
@@ -1433,9 +1451,9 @@ class install_update extends module
unset($tmp);
- if ($diff->merged_output(false, false, false, true))
+ if ($diff->get_num_conflicts())
{
- $update_ary['conflicts'] = $diff->_conflicting_blocks;
+ $update_ary['conflicts'] = $diff->get_num_conflicts();
// There is one special case... users having merged with a conflicting file... we need to check this
$tmp = array(
@@ -1462,7 +1480,7 @@ class install_update extends module
$tmp = array(
'file1' => file_get_contents($phpbb_root_path . $file),
- 'file2' => implode("\n", $diff->merged_output()),
+ 'file2' => implode("\n", $diff->merged_new_output()),
);
// now compare the merged output with the original file to see if the modified file is up to date
@@ -1648,4 +1666,4 @@ class install_update extends module
}
}
-?> \ No newline at end of file
+?>
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index ac3e90543b..b1784d26e8 100644
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -381,7 +381,7 @@ $lang = array_merge($lang, array(
'COMPLETE_LOGIN_TO_BOARD' => 'You should now <a href="../ucp.php?mode=login">login to your board</a> and check if everything is working fine. Do not forget to delete, rename or move your install directory!',
'CONTINUE_UPDATE_NOW' => 'Continue the update process now', // Shown within the database update script at the end if called from the updater
'CONTINUE_UPDATE' => 'Continue update now', // Shown after file upload to indicate the update process is not yet finished
- 'CURRENT_FILE' => 'Beginning of current original file',
+ 'CURRENT_FILE' => 'Begin of Conflict - Original File code before update',
'CURRENT_VERSION' => 'Current version',
'DATABASE_TYPE' => 'Database type',
@@ -391,7 +391,7 @@ $lang = array_merge($lang, array(
'DESTINATION' => 'Destination file',
'DIFF_INLINE' => 'Inline',
'DIFF_RAW' => 'Raw unified diff',
- 'DIFF_SEP_EXPLAIN' => 'End of current original file / Beginning of new updated file',
+ 'DIFF_SEP_EXPLAIN' => 'Code block used within the updated/new file',
'DIFF_SIDE_BY_SIDE' => 'Side by Side',
'DIFF_UNIFIED' => 'Unified diff',
'DO_NOT_UPDATE' => 'Do not update this file',
@@ -399,6 +399,8 @@ $lang = array_merge($lang, array(
'DOWNLOAD' => 'Download',
'DOWNLOAD_AS' => 'Download as',
'DOWNLOAD_UPDATE_METHOD_BUTTON' => 'Download modified files archive (recommended)',
+ 'DOWNLOAD_CONFLICTS' => 'Download conflicts for this file',
+ 'DOWNLOAD_CONFLICTS_EXPLAIN' => 'Search for &lt;&lt;&lt; to spot conflicts',
'DOWNLOAD_UPDATE_METHOD' => 'Download modified files archive',
'DOWNLOAD_UPDATE_METHOD_EXPLAIN' => 'Once downloaded you should unpack the archive. You will find the modified files you need to upload to your phpBB root directory within it. Please upload the files to their respective locations then. After you have uploaded all files, please check the files again with the other button below.',
@@ -443,13 +445,13 @@ $lang = array_merge($lang, array(
'MERGE_NO_MERGE_NEW_OPTION' => 'Do not merge - use new file',
'MERGE_NO_MERGE_MOD_OPTION' => 'Do not merge - use currently installed file',
- 'MERGE_MOD_FILE_OPTION' => 'Merge differences and use modified code within conflicting block',
- 'MERGE_NEW_FILE_OPTION' => 'Merge differences and use new file code within conflicting block',
+ 'MERGE_MOD_FILE_OPTION' => 'Merge modifications (Loose new phpBB code within conflicting block)',
+ 'MERGE_NEW_FILE_OPTION' => 'Merge modifications (Loose modified code within conflicting block)',
'MERGE_SELECT_ERROR' => 'Conflicting file merge modes are not correctly selected.',
'MERGING_FILES' => 'Merging differences',
'MERGING_FILES_EXPLAIN' => 'Currently collecting final file changes.<br /><br />Please wait until phpBB has completed all operations on changed files.',
- 'NEW_FILE' => 'End of new updated file',
+ 'NEW_FILE' => 'End of Conflict',
'NEW_USERNAME' => 'New username',
'NO_AUTH_UPDATE' => 'Not authorised to update',
'NO_ERRORS' => 'No errors',
@@ -623,4 +625,4 @@ $lang = array_merge($lang, array(
'TOPICS_TOPIC_TITLE' => 'Welcome to phpBB3',
));
-?> \ No newline at end of file
+?>