<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.7 |
+ | CiviCRM version 5 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2018 |
+--------------------------------------------------------------------+
/**
* Minimum previous CiviCRM version we can directly upgrade from
*/
- const MINIMUM_UPGRADABLE_VERSION = '4.0.8';
+ const MINIMUM_UPGRADABLE_VERSION = '4.1.3';
/**
* Minimum php version required to run (equal to or lower than the minimum install version)
$sqlFilePattern = '/^((\d{1,2}\.\d{1,2})\.(\d{1,2}\.)?(\d{1,2}|\w{4,7}))\.(my)?sql(\.tpl)?$/i';
foreach ($sqlFiles as $file) {
if (preg_match($sqlFilePattern, $file, $matches)) {
- if ($matches[2] == '4.0') {
- CRM_Core_Error::fatal("4.0.x upgrade files shouldn't exist. Contact Lobo to discuss this. This is related to the issue CRM-7731.");
- }
if (!in_array($matches[1], $revList)) {
$revList[] = $matches[1];
}
public static function buildQueue($currentVer, $latestVer, $postUpgradeMessageFile) {
$upgrade = new CRM_Upgrade_Form();
- // hack to make 4.0.x (D7,J1.6) codebase go through 3.4.x (d6, J1.5) upgrade files,
- // since schema wise they are same
- if (CRM_Upgrade_Form::getRevisionPart($currentVer) == '4.0') {
- $currentVer = str_replace('4.0.', '3.4.', $currentVer);
- }
-
// Ensure that queue can be created
if (!CRM_Queue_BAO_QueueItem::findCreateTable()) {
CRM_Core_Error::fatal(ts('Failed to find or create queueing table'));
$config = CRM_Core_Config::singleton();
$config->cleanupCaches(1);
+ $versionCheck = new CRM_Utils_VersionCheck();
+ $versionCheck->flushCache();
+
// Rebuild all triggers and re-enable logging if needed
$logging = new CRM_Logging_Schema();
$logging->fixSchemaDifferences();
foreach ($revisions as $rev) {
if (version_compare($currentVer, $rev) < 0) {
$versionObject = $this->incrementalPhpObject($rev);
+ CRM_Upgrade_Incremental_General::updateMessageTemplate($preUpgradeMessage, $rev);
if (is_callable(array($versionObject, 'setPreUpgradeMessage'))) {
$versionObject->setPreUpgradeMessage($preUpgradeMessage, $rev, $currentVer);
}