Skip to content
Snippets Groups Projects
Commit 09149f58 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge branch 'feature/dept-access' into feature/csrf

parents b7ab257d e15cb358
No related branches found
No related tags found
No related merge requests found
......@@ -43,12 +43,17 @@ class UpgraderAjaxAPI extends AjaxController {
//More pending tasks - doTasks returns the number of pending tasks
Http::response(200, $upgrader->getNextAction());
exit;
} elseif($ost->isUpgradePending() && $upgrader->isUpgradable()) {
$version = $upgrader->getNextVersion();
if($upgrader->upgrade()) {
//We're simply reporting progress here - call back will report next action'
Http::response(200, "Upgraded to $version ... post-upgrade checks!");
exit;
} elseif($ost->isUpgradePending()) {
if($upgrader->isUpgradable()) {
$version = $upgrader->getNextVersion();
if($upgrader->upgrade()) {
//We're simply reporting progress here - call back will report next action'
Http::response(200, "Upgraded to $version ... post-upgrade checks!");
exit;
}
} else {
//Abort: Upgrade pending but NOT upgradable - invalid or wrong hash.
$upgrader->abort(sprintf('Upgrade Failed: Invalid or wrong hash [%s]',$ost->getDBSignature()));
}
} elseif(!$ost->isUpgradePending()) {
$upgrader->setState('done');
......
......@@ -278,7 +278,7 @@ class Upgrader extends SetupWizard {
$tasks[] = array('func' => 'migrateAPIKeys',
'desc' => 'Migrating API keys to a new table');
break;
case '435c62c3-6007d45b':
case '435c62c3-2e7531a2':
$tasks[] = array('func' => 'migrateGroupDeptAccess',
'desc' => 'Migrating group\'s department access to a new table');
break;
......
......@@ -28,4 +28,4 @@ UPDATE `%TABLE_PREFIX%groups`
-- Finished with patch
UPDATE `%TABLE_PREFIX%config`
SET `schema_signature`='6007d45b580c6ac0206514dbed0f28a6';
SET `schema_signature`='2e7531a201b5b8650dcd43681a832ebd';
......@@ -71,7 +71,8 @@ switch(strtolower($upgrader->getState())) {
elseif(!$ost->isUpgradePending())
$errors['err']='Nothing to do! System already upgraded to <b>'.$ost->getVersion().'</b> with no pending patches to apply.';
elseif(!$upgrader->isUpgradable())
$errors['err']='The upgrader does NOT support upgrading from the current vesion!';
$errors['err']=sprintf('The upgrader does NOT support upgrading from the current patch [%s]!', $cfg->getSchemaSignature());
}
$nav = new AdminNav($thisstaff);
......
......@@ -99,7 +99,7 @@ class Installer extends SetupWizard {
define('ADMIN_EMAIL',$vars['admin_email']); //Needed to report SQL errors during install.
define('PREFIX',$vars['prefix']); //Table prefix
$schemaFile =INC_DIR.'sql/osticket-v1.7-mysql.sql'; //DB dump.
$schemaFile =INC_DIR.'sql/osTicket-mysql.sql'; //DB dump.
$debug = true; //XXX:Change it to true to show SQL errors.
//Last minute checks.
......
This diff is collapsed.
-- Drop fields we no longer need in the reference table.
ALTER TABLE `%TABLE_PREFIX%ticket_attachment`
DROP `file_size`,
DROP `file_name`,
DROP `file_key`,
DROP `updated`,
DROP `isdeleted`;
-- Drop fields we no longer need in config table.
ALTER TABLE `%TABLE_PREFIX%config`
DROP `api_passphrase`;
-- Drop fields we no longer need in staff table.
ALTER TABLE `%TABLE_PREFIX%staff`
DROP `append_signature`,
DROP `timezone_offset`;
-- Drop fields we no longer need in department table.
ALTER TABLE `%TABLE_PREFIX%department`
DROP `can_append_signature`;
-- Banlist table has been migrated to the email_filter_rule table
DROP TABLE `%TABLE_PREFIX%email_banlist`;
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