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 { ...@@ -43,12 +43,17 @@ class UpgraderAjaxAPI extends AjaxController {
//More pending tasks - doTasks returns the number of pending tasks //More pending tasks - doTasks returns the number of pending tasks
Http::response(200, $upgrader->getNextAction()); Http::response(200, $upgrader->getNextAction());
exit; exit;
} elseif($ost->isUpgradePending() && $upgrader->isUpgradable()) { } elseif($ost->isUpgradePending()) {
$version = $upgrader->getNextVersion(); if($upgrader->isUpgradable()) {
if($upgrader->upgrade()) { $version = $upgrader->getNextVersion();
//We're simply reporting progress here - call back will report next action' if($upgrader->upgrade()) {
Http::response(200, "Upgraded to $version ... post-upgrade checks!"); //We're simply reporting progress here - call back will report next action'
exit; 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()) { } elseif(!$ost->isUpgradePending()) {
$upgrader->setState('done'); $upgrader->setState('done');
......
...@@ -278,7 +278,7 @@ class Upgrader extends SetupWizard { ...@@ -278,7 +278,7 @@ class Upgrader extends SetupWizard {
$tasks[] = array('func' => 'migrateAPIKeys', $tasks[] = array('func' => 'migrateAPIKeys',
'desc' => 'Migrating API keys to a new table'); 'desc' => 'Migrating API keys to a new table');
break; break;
case '435c62c3-6007d45b': case '435c62c3-2e7531a2':
$tasks[] = array('func' => 'migrateGroupDeptAccess', $tasks[] = array('func' => 'migrateGroupDeptAccess',
'desc' => 'Migrating group\'s department access to a new table'); 'desc' => 'Migrating group\'s department access to a new table');
break; break;
......
...@@ -28,4 +28,4 @@ UPDATE `%TABLE_PREFIX%groups` ...@@ -28,4 +28,4 @@ UPDATE `%TABLE_PREFIX%groups`
-- Finished with patch -- Finished with patch
UPDATE `%TABLE_PREFIX%config` UPDATE `%TABLE_PREFIX%config`
SET `schema_signature`='6007d45b580c6ac0206514dbed0f28a6'; SET `schema_signature`='2e7531a201b5b8650dcd43681a832ebd';
...@@ -71,7 +71,8 @@ switch(strtolower($upgrader->getState())) { ...@@ -71,7 +71,8 @@ switch(strtolower($upgrader->getState())) {
elseif(!$ost->isUpgradePending()) elseif(!$ost->isUpgradePending())
$errors['err']='Nothing to do! System already upgraded to <b>'.$ost->getVersion().'</b> with no pending patches to apply.'; $errors['err']='Nothing to do! System already upgraded to <b>'.$ost->getVersion().'</b> with no pending patches to apply.';
elseif(!$upgrader->isUpgradable()) 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); $nav = new AdminNav($thisstaff);
......
...@@ -99,7 +99,7 @@ class Installer extends SetupWizard { ...@@ -99,7 +99,7 @@ class Installer extends SetupWizard {
define('ADMIN_EMAIL',$vars['admin_email']); //Needed to report SQL errors during install. define('ADMIN_EMAIL',$vars['admin_email']); //Needed to report SQL errors during install.
define('PREFIX',$vars['prefix']); //Table prefix 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. $debug = true; //XXX:Change it to true to show SQL errors.
//Last minute checks. //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