$restore = \CRM_Upgrade_DispatchPolicy::useTemporarily('upgrade.finish');
$upgrade = new CRM_Upgrade_Form();
- list($ignore, $latestVer) = $upgrade->getUpgradeVersions();
+ [$ignore, $latestVer] = $upgrade->getUpgradeVersions();
// Seems extraneous in context, but we'll preserve old behavior
$upgrade->setVersion($latestVer);
// Going forward, any new tasks will run in `upgrade.finish` mode.
set_time_limit(0);
$upgrade = new CRM_Upgrade_Form();
- list($currentVer, $latestVer) = $upgrade->getUpgradeVersions();
+ [$currentVer, $latestVer] = $upgrade->getUpgradeVersions();
if ($error = $upgrade->checkUpgradeableVersion($currentVer, $latestVer)) {
throw new Exception($error);
continue;
}
// parse out existing id and direction
- list($relationshipTypeId, $direction1) = explode('_', $match);
+ [$relationshipTypeId, $direction1] = explode('_', $match);
// we only care about ones that are b_a
if ($direction1 === 'b') {
// we only care about bidirectional
$this->addTask(ts('Upgrade DB to %1: SQL', [1 => $rev]), 'runSql', $rev);
$this->addTask('Install eventcart extension', 'installEventCart');
- list($minId, $maxId) = CRM_Core_DAO::executeQuery("SELECT coalesce(min(id),0), coalesce(max(id),0)
+ [$minId, $maxId] = CRM_Core_DAO::executeQuery("SELECT coalesce(min(id),0), coalesce(max(id),0)
FROM civicrm_relationship ")->getDatabaseResult()->fetchRow();
for ($startId = $minId; $startId <= $maxId; $startId += self::BATCH_SIZE) {
$endId = $startId + self::BATCH_SIZE - 1;
// CRM-20868 : Update invoice_numbers (in batch) with value in [invoice prefix][contribution id] format
$contributionSettings = Civi::settings()->get('contribution_invoice_settings');
if (!empty($contributionSettings['invoicing']) && !empty($contributionSettings['invoice_prefix'])) {
- list($minId, $maxId) = CRM_Core_DAO::executeQuery("SELECT coalesce(min(id),0), coalesce(max(id),0)
+ [$minId, $maxId] = CRM_Core_DAO::executeQuery("SELECT coalesce(min(id),0), coalesce(max(id),0)
FROM civicrm_contribution ")->getDatabaseResult()->fetchRow();
for ($startId = $minId; $startId <= $maxId; $startId += self::BATCH_SIZE) {
$endId = $startId + self::BATCH_SIZE - 1;
Civi::resources()->addStyleFile('civicrm', 'css/admin.css');
$upgrade = new CRM_Upgrade_Form();
- list($currentVer, $latestVer) = $upgrade->getUpgradeVersions();
+ [$currentVer, $latestVer] = $upgrade->getUpgradeVersions();
CRM_Utils_System::setTitle(ts('Upgrade CiviCRM to Version %1',
[1 => $latestVer]
public function runIntro() {
$upgrade = new CRM_Upgrade_Form();
$template = CRM_Core_Smarty::singleton();
- list($currentVer, $latestVer) = $upgrade->getUpgradeVersions();
+ [$currentVer, $latestVer] = $upgrade->getUpgradeVersions();
CRM_Core_Smarty::singleton()->assign('sid', CRM_Utils_System::getSiteID());
// Show success msg if db already upgraded
if (version_compare($currentVer, $latestVer) == 0) {
*/
public function runBegin() {
$upgrade = new CRM_Upgrade_Form();
- list($currentVer, $latestVer) = $upgrade->getUpgradeVersions();
+ [$currentVer, $latestVer] = $upgrade->getUpgradeVersions();
if ($error = $upgrade->checkUpgradeableVersion($currentVer, $latestVer)) {
throw new CRM_Core_Exception($error);
}
// do a version check - after doFinish() sets the final version
- list($currentVer, $latestVer) = $upgrade->getUpgradeVersions();
+ [$currentVer, $latestVer] = $upgrade->getUpgradeVersions();
if ($error = $upgrade->checkCurrentVersion($currentVer, $latestVer)) {
throw new CRM_Core_Exception($error);
}