Ejemplo n.º 1
0
 function testUpgradeDateTimeFields()
 {
     upgradeDateTimeFields();
     global $db;
     $query = "SELECT date_start, date_end FROM meetings WHERE id = '{$this->meeting->id}'";
     $result = $db->query($query);
     $row = $db->fetchByAssoc($result);
     $start_time = strtotime($row['date_start']);
     $end_time = strtotime($row['date_end']);
     $this->assertEquals($end_time - $start_time, 2.5 * 60 * 60, 'Assert that date_end in meetings table has been properly converted');
     $query = "SELECT date_start, date_end FROM calls WHERE id = '{$this->call->id}'";
     $result = $db->query($query);
     $row = $db->fetchByAssoc($result);
     $start_time = strtotime($row['date_start']);
     $end_time = strtotime($row['date_end']);
     $this->assertEquals($end_time - $start_time, 2.5 * 60 * 60, 'Assert that date_end in calls table has been properly converted');
 }
Ejemplo n.º 2
0
    add_unified_search_to_custom_modules_vardefs();
    logThis('Add global search for custom modules finished .', $path);
}
//Upgrade system displayed tabs and subpanels
if (function_exists('upgradeDisplayedTabsAndSubpanels')) {
    upgradeDisplayedTabsAndSubpanels($_SESSION['current_db_version']);
}
//Unlink files that have been removed
if (function_exists('unlinkUpgradeFiles')) {
    unlinkUpgradeFiles($_SESSION['current_db_version']);
}
require_once 'modules/Administration/upgrade_custom_relationships.php';
upgrade_custom_relationships();
require_once 'modules/UpgradeWizard/uw_utils.php';
if ($_SESSION['current_db_version'] < '620') {
    upgradeDateTimeFields($path);
    upgradeDocumentTypeFields($path);
}
//Update the license
logThis('Start Updating the license ', $path);
ob_start();
check_now(get_sugarbeat());
ob_end_clean();
logThis('End Updating the license ', $path);
set_upgrade_progress('end', 'done');
logThis('Cleaning up the session.  Goodbye.');
unlinkTempFiles();
logThis('Cleaning up the session.  Goodbye.');
resetUwSession();
// flag to say upgrade has completed
$_SESSION['upgrade_complete'] = true;