Skip to content
Snippets Groups Projects
Commit a0b3ff92 authored by Jared Hancock's avatar Jared Hancock
Browse files

Add better description to the upgrader

Fix duplicate phone number (again)
parent 9e5f5e4b
No related branches found
No related tags found
No related merge requests found
......@@ -131,6 +131,11 @@ class Upgrader {
return $this->getCurrentStream()->getErrors();
}
function getUpgradeSummary() {
if ($this->getCurrentStream())
return $this->getCurrentStream()->getUpgradeSummary();
}
function getNextAction() {
if ($this->getCurrentStream())
return $this->getCurrentStream()->getNextAction();
......@@ -299,6 +304,19 @@ class StreamUpgrader extends SetupWizard {
return $info;
}
function getUpgradeSummary() {
$summary = '';
foreach ($this->getPatches() as $p) {
$info = $this->readPatchInfo($p);
$summary .= '<div class="patch">' . $info['version'];
if (isset($info['title']))
$summary .= ': <span class="patch-title">'.$info['title']
.'</span>';
$summary .= '</div>';
}
return $summary;
}
function getNextAction() {
$action='Upgrade osTicket to '.$this->getVersion();
......
......@@ -11,10 +11,10 @@ INSERT INTO `%TABLE_PREFIX%form_entry_values` (
`field_id`, `entry_id`, `value`)
SELECT A3.`id`, A2.`id`, A1.`subject`
FROM `%TABLE_PREFIX%ticket` A1
INNER JOIN `%TABLE_PREFIX%form` A4 ON (`type`='T')
INNER JOIN `%TABLE_PREFIX%form_entry` A2 ON (A2.`object_id`
= A1.`ticket_id` AND A2.`object_type` = 'T')
INNER JOIN `%TABLE_PREFIX%form_field` A3 ON (A2.`form_id`
INNER JOIN `%TABLE_PREFIX%form` A4 ON (A4.`id` = A2.`form_id`)
INNER JOIN `%TABLE_PREFIX%form_field` A3 ON (A3.`form_id`
= A4.`id`)
WHERE A3.`name` = 'subject';
......@@ -23,10 +23,10 @@ INSERT INTO `%TABLE_PREFIX%form_entry_values` (
`field_id`, `entry_id`, `value`, `value_id`)
SELECT A3.`id`, A2.`id`, A5.`priority_desc`, A1.`priority_id`
FROM `%TABLE_PREFIX%ticket` A1
INNER JOIN `%TABLE_PREFIX%form` A4 ON (`type`='T')
INNER JOIN `%TABLE_PREFIX%form_entry` A2 ON (A2.`object_id`
= A1.`ticket_id` AND A2.`object_type` = 'T')
INNER JOIN `%TABLE_PREFIX%form_field` A3 ON (A2.`form_id`
INNER JOIN `%TABLE_PREFIX%form` A4 ON (A4.`id` = A2.`form_id`)
INNER JOIN `%TABLE_PREFIX%form_field` A3 ON (A3.`form_id`
= A4.`id`)
INNER JOIN `%TABLE_PREFIX%ticket_priority` A5 ON (A5.`priority_id`
= A1.`priority_id`)
......@@ -86,7 +86,7 @@ INSERT INTO `%TABLE_PREFIX%form_entry_values` (
INNER JOIN `%TABLE_PREFIX%form_entry` A2 ON (A2.`object_id`
= A1.`ticket_id` AND A2.`object_type` = 'U')
INNER JOIN `%TABLE_PREFIX%form` A4 ON (A4.`id` = A2.`form_id`)
INNER JOIN `%TABLE_PREFIX%form_field` A3 ON (A2.`form_id`
INNER JOIN `%TABLE_PREFIX%form_field` A3 ON (A3.`form_id`
= A4.`id`)
WHERE A3.`name` = 'phone' AND LENGTH(A1.`phone`)
GROUP BY A3.`id`, A2.`id`;
......
......@@ -13,20 +13,24 @@ if(($mode = $ost->get_var('m', $_GET)) && $mode!=$upgrader->getMode()) {
$action=$upgrader->getNextAction();
?>
<h2>osTicket Upgrade</h2>
<h2>Migrate to osTicket <?php echo THIS_VERSION; ?></h2>
<div id="upgrader">
<div id="main">
<div id="intro">
<p>Thank you for taking the time to upgrade your osTicket intallation!</p>
<p>Please don't cancel or close the browser; any errors at this stage will be fatal.</p>
<p><strong>Please don't cancel or close the browser; any errors
at this stage will be fatal.</strong></p>
</div>
<h2 id="task"><?php echo $action ?></h2>
<p>The upgrade wizard will now attempt to upgrade your database and core settings!</p>
<ul>
<li>Database enhancements</li>
<li>New and updated features</li>
<li>Enhanced settings and security</li>
</ul>
<h2 id="task">Applying updates to database stream:
<?php echo $upgrader->getCurrentStream()->name; ?></h2>
<p>In order to upgrade to this version of osTicket, a database
migration is required. This upgrader will automatically apply
the database patches shipped with osTicket since your last
upgrade.</p>
<p>The upgrade wizard will now attempt to upgrade your database and core settings!
Below is a summary of the database patches to be applied.
</p>
<?php echo $upgrader->getUpgradeSummary(); ?>
<div id="bar">
<form method="post" action="upgrade.php" id="upgrade">
<?php csrf_token(); ?>
......
......@@ -1497,3 +1497,12 @@ input.dp {
.icon-warning-sign {
color: #d33;
}
div.patch {
border-bottom: 1px dotted #ccc;
padding: 0.1em;
margin-left: 1em;
}
.patch-title {
color: #555;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment