Merge pull request #17008 from ivan-compucorp/CPS-70-fix-radio-value
[civicrm-core.git] / CRM / Upgrade / Page / Cleanup.php
CommitLineData
6a488035
TO
1<?php
2/*
3 +--------------------------------------------------------------------+
bc77d7c0 4 | Copyright CiviCRM LLC. All rights reserved. |
6a488035 5 | |
bc77d7c0
TO
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
6a488035 9 +--------------------------------------------------------------------+
d25dd0ee 10 */
624e56fa
EM
11
12/**
13 * Class CRM_Upgrade_Page_Cleanup
14 */
353ffa53 15class CRM_Upgrade_Page_Cleanup extends CRM_Core_Page {
3655bea4 16
6a488035 17 public function cleanup425() {
353ffa53 18 $rows = CRM_Upgrade_Incremental_php_FourTwo::deleteInvalidPairs();
6a488035
TO
19 $template = CRM_Core_Smarty::singleton();
20
be2fb01f 21 $columnHeaders = [
353ffa53
TO
22 "Contact ID",
23 "ContributionID",
24 "Contribution Status",
25 "MembershipID",
26 "Membership Type",
27 "Start Date",
28 "End Date",
29 "Membership Status",
af9b09df 30 "Action",
be2fb01f 31 ];
6a488035
TO
32 $template->assign('columnHeaders', $columnHeaders);
33 $template->assign('rows', $rows);
34
35 $preMessage = !empty($rows) ? ts('The following records have been processed. Membership records with action = Un-linked have been disconnected from the listed contribution record:') : ts('Could not find any records to process.');
36 $template->assign('preMessage', $preMessage);
37
e418776c 38 $postMessage = ts('You can <a href="%1">click here</a> to try running the 4.2 upgrade script again. <a href="%2" target="_blank">(Review upgrade documentation)</a>',
be2fb01f 39 [
353ffa53 40 1 => CRM_Utils_System::url('civicrm/upgrade', 'reset=1'),
af9b09df 41 2 => 'http://wiki.civicrm.org/confluence/display/CRMDOC/Installation+and+Upgrades',
be2fb01f 42 ]);
6a488035
TO
43 $template->assign('postMessage', $postMessage);
44
45 $content = $template->fetch('CRM/common/upgradeCleanup.tpl');
46 echo CRM_Utils_System::theme($content, FALSE, TRUE);
47 }
96025800 48
232624b1 49}