mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 05:48:51 +00:00
Merge branch '3.2.x'
This commit is contained in:
commit
cd757469a6
4 changed files with 49 additions and 14 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
<!-- IF FORM_TITLE --><h1>{FORM_TITLE}</h1><!-- ENDIF -->
|
||||||
<form id="<!-- IF FORM_ID -->{FORM_ID}<!-- ELSE -->install_install<!-- ENDIF -->" method="POST" action="{U_ACTION}">
|
<form id="<!-- IF FORM_ID -->{FORM_ID}<!-- ELSE -->install_install<!-- ENDIF -->" method="POST" action="{U_ACTION}">
|
||||||
<!-- IF .options -->
|
<!-- IF .options -->
|
||||||
<!-- IF S_NOT_ONLY_BUTTON_FORM -->
|
<!-- IF S_NOT_ONLY_BUTTON_FORM -->
|
||||||
|
@ -8,9 +9,9 @@
|
||||||
<!-- IF options.S_LEGEND -->
|
<!-- IF options.S_LEGEND -->
|
||||||
<!-- IF not options.S_FIRST_ROW -->
|
<!-- IF not options.S_FIRST_ROW -->
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset>
|
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
<fieldset>
|
||||||
|
|
||||||
<legend>{options.LEGEND}</legend>
|
<legend>{options.LEGEND}</legend>
|
||||||
<!-- ELSE -->
|
<!-- ELSE -->
|
||||||
<dl>
|
<dl>
|
||||||
|
@ -49,7 +50,7 @@
|
||||||
<fieldset class="submit-buttons">
|
<fieldset class="submit-buttons">
|
||||||
<legend>{L_SUBMIT}</legend>
|
<legend>{L_SUBMIT}</legend>
|
||||||
<!-- BEGIN submit_buttons -->
|
<!-- BEGIN submit_buttons -->
|
||||||
<input class="button1<!-- IF submit_buttons.DISABLED --> disabled<!-- ENDIF -->" type="submit" name="{submit_buttons.KEY}" value="{submit_buttons.TITLE}"<!-- IF submit_buttons.DISABLED --> disabled="disabled"<!-- ENDIF --> />
|
<input class="<!-- IF not submit_buttons.IS_SECONDARY -->button1<!-- ELSE -->button2<!-- ENDIF --><!-- IF submit_buttons.DISABLED --> disabled<!-- ENDIF -->" type="submit" name="{submit_buttons.KEY}" value="{submit_buttons.TITLE}"<!-- IF submit_buttons.DISABLED --> disabled="disabled"<!-- ENDIF --> />
|
||||||
<!-- END submit_buttons -->
|
<!-- END submit_buttons -->
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
|
|
@ -187,6 +187,7 @@ class ajax_iohandler extends iohandler_base
|
||||||
$tpl_ary['KEY'] = $input_name;
|
$tpl_ary['KEY'] = $input_name;
|
||||||
$tpl_ary['S_EXPLAIN'] = false;
|
$tpl_ary['S_EXPLAIN'] = false;
|
||||||
$tpl_ary['DISABLED'] = isset($input_options['disabled']) ? $input_options['disabled'] : false;
|
$tpl_ary['DISABLED'] = isset($input_options['disabled']) ? $input_options['disabled'] : false;
|
||||||
|
$tpl_ary['IS_SECONDARY'] = isset($input_options['is_secondary']) ? $input_options['is_secondary'] : false;
|
||||||
|
|
||||||
if (isset($input_options['default']))
|
if (isset($input_options['default']))
|
||||||
{
|
{
|
||||||
|
@ -218,6 +219,11 @@ class ajax_iohandler extends iohandler_base
|
||||||
$this->template->assign_block_vars($block_name, $tpl_ary);
|
$this->template->assign_block_vars($block_name, $tpl_ary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($form['database_update_submit']) && !$form['database_update_submit']['disabled'])
|
||||||
|
{
|
||||||
|
$this->template->assign_var('FORM_TITLE', $this->language->lang('UPDATE_CONTINUE_UPDATE_PROCESS'));
|
||||||
|
}
|
||||||
|
|
||||||
$this->template->assign_var('S_NOT_ONLY_BUTTON_FORM', $not_button_form);
|
$this->template->assign_var('S_NOT_ONLY_BUTTON_FORM', $not_button_form);
|
||||||
|
|
||||||
if (!$not_button_form)
|
if (!$not_button_form)
|
||||||
|
|
|
@ -103,8 +103,8 @@ class diff_files extends task_base
|
||||||
$old_path = $this->update_helper->get_path_to_old_update_files();
|
$old_path = $this->update_helper->get_path_to_old_update_files();
|
||||||
$new_path = $this->update_helper->get_path_to_new_update_files();
|
$new_path = $this->update_helper->get_path_to_new_update_files();
|
||||||
|
|
||||||
$files_to_diff = $this->installer_config->get('update_files', array());
|
$update_files = $this->installer_config->get('update_files', array());
|
||||||
$files_to_diff = $files_to_diff['update_with_diff'];
|
$files_to_diff = $update_files['update_with_diff'];
|
||||||
|
|
||||||
// Set progress bar
|
// Set progress bar
|
||||||
$this->iohandler->set_task_count(count($files_to_diff), true);
|
$this->iohandler->set_task_count(count($files_to_diff), true);
|
||||||
|
@ -154,7 +154,6 @@ class diff_files extends task_base
|
||||||
}
|
}
|
||||||
|
|
||||||
$diff = new \diff3($file_contents[0], $file_contents[1], $file_contents[2]);
|
$diff = new \diff3($file_contents[0], $file_contents[1], $file_contents[2]);
|
||||||
unset($file_contents);
|
|
||||||
|
|
||||||
// Handle conflicts
|
// Handle conflicts
|
||||||
if ($diff->get_num_conflicts() !== 0)
|
if ($diff->get_num_conflicts() !== 0)
|
||||||
|
@ -162,12 +161,20 @@ class diff_files extends task_base
|
||||||
$merge_conflicts[] = $filename;
|
$merge_conflicts[] = $filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save merged output
|
if ($diff->merged_output() !== $file_contents[1])
|
||||||
$this->cache->put(
|
{
|
||||||
'_file_' . md5($filename),
|
// Save merged output
|
||||||
base64_encode(implode("\n", $diff->merged_output()))
|
$this->cache->put(
|
||||||
);
|
'_file_' . md5($filename),
|
||||||
|
base64_encode(implode("\n", $diff->merged_output()))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
unset($update_files['update_with_diff'][$key]);
|
||||||
|
}
|
||||||
|
|
||||||
|
unset($file_contents);
|
||||||
unset($diff);
|
unset($diff);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -199,6 +206,16 @@ class diff_files extends task_base
|
||||||
$this->installer_config->set('merge_conflict_list', $merge_conflicts);
|
$this->installer_config->set('merge_conflict_list', $merge_conflicts);
|
||||||
$this->installer_config->set('file_diff_update_count', $progress_count);
|
$this->installer_config->set('file_diff_update_count', $progress_count);
|
||||||
|
|
||||||
|
foreach ($update_files as $type => $files)
|
||||||
|
{
|
||||||
|
if (empty($files))
|
||||||
|
{
|
||||||
|
unset($update_files[$type]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->installer_config->set('update_files', $update_files);
|
||||||
|
|
||||||
// Request refresh
|
// Request refresh
|
||||||
throw new resource_limit_reached_exception();
|
throw new resource_limit_reached_exception();
|
||||||
}
|
}
|
||||||
|
@ -206,6 +223,16 @@ class diff_files extends task_base
|
||||||
|
|
||||||
$this->iohandler->finish_progress('ALL_FILES_DIFFED');
|
$this->iohandler->finish_progress('ALL_FILES_DIFFED');
|
||||||
$this->installer_config->set('merge_conflict_list', $merge_conflicts);
|
$this->installer_config->set('merge_conflict_list', $merge_conflicts);
|
||||||
|
|
||||||
|
foreach ($update_files as $type => $files)
|
||||||
|
{
|
||||||
|
if (empty($files))
|
||||||
|
{
|
||||||
|
unset($update_files[$type]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->installer_config->set('update_files', $update_files);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -99,13 +99,14 @@ class download_updated_files extends task_base
|
||||||
// Add form to continue update
|
// Add form to continue update
|
||||||
$this->iohandler->add_user_form_group('UPDATE_CONTINUE_UPDATE_PROCESS', array(
|
$this->iohandler->add_user_form_group('UPDATE_CONTINUE_UPDATE_PROCESS', array(
|
||||||
'update_recheck_files_submit' => array(
|
'update_recheck_files_submit' => array(
|
||||||
'label' => 'UPDATE_RECHECK_UPDATE_FILES',
|
'label' => 'UPDATE_RECHECK_UPDATE_FILES',
|
||||||
'type' => 'submit',
|
'type' => 'submit',
|
||||||
|
'is_secondary' => empty($file_update_info),
|
||||||
),
|
),
|
||||||
'database_update_submit' => array(
|
'database_update_submit' => array(
|
||||||
'label' => 'UPDATE_CONTINUE_UPDATE_PROCESS',
|
'label' => 'UPDATE_CONTINUE_UPDATE_PROCESS',
|
||||||
'type' => 'submit',
|
'type' => 'submit',
|
||||||
'disabled' => count($file_update_info) > 0,
|
'disabled' => !empty($file_update_info),
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue