From 7d7bd0d1f7d8178230888ae88c1e4348651a643f Mon Sep 17 00:00:00 2001
From: Kevin Cristiano <kcristiano@kcristiano.com>
Date: Thu, 20 Aug 2020 07:01:07 -0400
Subject: [PATCH] civicrm release

---
 civicrm.php                                   |  4 +-
 civicrm/CRM/Core/Config/Runtime.php           |  8 ++++
 civicrm/CRM/Report/Form.php                   | 15 +------
 .../Upgrade/Incremental/sql/5.28.2.mysql.tpl  |  1 +
 civicrm/civicrm-version.php                   |  2 +-
 civicrm/release-notes.md                      |  9 +++++
 civicrm/release-notes/5.28.2.md               | 40 +++++++++++++++++++
 civicrm/sql/civicrm_data.mysql                |  2 +-
 civicrm/sql/civicrm_generated.mysql           |  2 +-
 civicrm/vendor/autoload.php                   |  2 +-
 civicrm/vendor/composer/autoload_real.php     | 14 +++----
 civicrm/vendor/composer/autoload_static.php   | 12 +++---
 civicrm/xml/version.xml                       |  2 +-
 13 files changed, 79 insertions(+), 34 deletions(-)
 create mode 100644 civicrm/CRM/Upgrade/Incremental/sql/5.28.2.mysql.tpl
 create mode 100644 civicrm/release-notes/5.28.2.md

diff --git a/civicrm.php b/civicrm.php
index e1fa3472fc..978238c19b 100644
--- a/civicrm.php
+++ b/civicrm.php
@@ -2,7 +2,7 @@
 /*
 Plugin Name: CiviCRM
 Description: CiviCRM - Growing and Sustaining Relationships
-Version: 5.28.1
+Version: 5.28.2
 Requires at least: 4.9
 Requires PHP:      7.1
 Author: CiviCRM LLC
@@ -56,7 +56,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
 
 
 // Set version here: when it changes, will force JS to reload
-define( 'CIVICRM_PLUGIN_VERSION', '5.28.1' );
+define( 'CIVICRM_PLUGIN_VERSION', '5.28.2' );
 
 // Store reference to this file
 if (!defined('CIVICRM_PLUGIN_FILE')) {
diff --git a/civicrm/CRM/Core/Config/Runtime.php b/civicrm/CRM/Core/Config/Runtime.php
index 7e927af94f..1fd76d270d 100644
--- a/civicrm/CRM/Core/Config/Runtime.php
+++ b/civicrm/CRM/Core/Config/Runtime.php
@@ -141,6 +141,14 @@ class CRM_Core_Config_Runtime extends CRM_Core_Config_MagicMerge {
         defined('CIVICRM_DOMAIN_ID') ? CIVICRM_DOMAIN_ID : 1,
         // e.g. one codebase, multi database
         parse_url(CIVICRM_DSN, PHP_URL_PATH),
+
+        // e.g. when you load a new version of the codebase, use different caches
+        // Note: in principle, the version number is just a proxy for a dozen other signals (new versions of file A, B, C).
+        // Proper caches should reset whenever the underlying signal (file A, B, or C) changes. However, bugs in this
+        // behavior often go un-detected during dev/test. Including the software-version basically mitigates the problem
+        // for sysadmin-workflows - so that such bugs should only impact developer-workflows.
+        \CRM_Utils_System::version(),
+
         // e.g. CMS vs extern vs installer
         \CRM_Utils_Array::value('SCRIPT_FILENAME', $_SERVER, ''),
         // e.g. name-based vhosts
diff --git a/civicrm/CRM/Report/Form.php b/civicrm/CRM/Report/Form.php
index 4733569124..2bd8d4d506 100644
--- a/civicrm/CRM/Report/Form.php
+++ b/civicrm/CRM/Report/Form.php
@@ -139,11 +139,6 @@ class CRM_Report_Form extends CRM_Core_Form {
    */
   protected $_groupFilter = FALSE;
 
-  /**
-   * Required for civiexportexcel.
-   */
-  public $supportsExportExcel = TRUE;
-
   /**
    * Has the report been optimised for group filtering.
    *
@@ -1440,7 +1435,7 @@ class CRM_Report_Form extends CRM_Core_Form {
     if (!CRM_Core_Permission::check('view report sql')) {
       return;
     }
-    $ignored_output_modes = ['pdf', 'csv', 'print', 'excel2007'];
+    $ignored_output_modes = ['pdf', 'csv', 'print'];
     if (in_array($this->_outputMode, $ignored_output_modes)) {
       return;
     }
@@ -2866,11 +2861,6 @@ WHERE cg.extends IN ('" . implode("','", $this->_customGroupExtends) . "') AND
       $this->_absoluteUrl = TRUE;
       $this->addPaging = FALSE;
     }
-    elseif ($this->_outputMode == 'excel2007') {
-      $printOnly = TRUE;
-      $this->_absoluteUrl = TRUE;
-      $this->addPaging = FALSE;
-    }
     elseif ($this->_outputMode == 'copy' && $this->_criteriaForm) {
       $this->_createNew = TRUE;
     }
@@ -3508,9 +3498,6 @@ WHERE cg.extends IN ('" . implode("','", $this->_customGroupExtends) . "') AND
     elseif ($this->_outputMode == 'csv') {
       CRM_Report_Utils_Report::export2csv($this, $rows);
     }
-    elseif ($this->_outputMode == 'excel2007') {
-      CRM_CiviExportExcel_Utils_Report::export2excel2007($this, $rows);
-    }
     elseif ($this->_outputMode == 'group') {
       $group = $this->_params['groups'];
       $this->add2group($group);
diff --git a/civicrm/CRM/Upgrade/Incremental/sql/5.28.2.mysql.tpl b/civicrm/CRM/Upgrade/Incremental/sql/5.28.2.mysql.tpl
new file mode 100644
index 0000000000..3140fe775e
--- /dev/null
+++ b/civicrm/CRM/Upgrade/Incremental/sql/5.28.2.mysql.tpl
@@ -0,0 +1 @@
+{* file to handle db changes in 5.28.2 during upgrade *}
diff --git a/civicrm/civicrm-version.php b/civicrm/civicrm-version.php
index 948a2c6b5f..f76c36a7bc 100644
--- a/civicrm/civicrm-version.php
+++ b/civicrm/civicrm-version.php
@@ -1,7 +1,7 @@
 <?php
 /** @deprecated */
 function civicrmVersion( ) {
-  return array( 'version'  => '5.28.1',
+  return array( 'version'  => '5.28.2',
                 'cms'      => 'Wordpress',
                 'revision' => '' );
 }
diff --git a/civicrm/release-notes.md b/civicrm/release-notes.md
index d4ea4c09ab..d9e8a8d34a 100644
--- a/civicrm/release-notes.md
+++ b/civicrm/release-notes.md
@@ -15,6 +15,15 @@ Other resources for identifying changes are:
     * https://github.com/civicrm/civicrm-joomla
     * https://github.com/civicrm/civicrm-wordpress
 
+## CiviCRM 5.28.2
+
+Released August 20, 2020
+
+- **[Synopsis](release-notes/5.28.2.md#synopsis)**
+- **[Bugs resolved](release-notes/5.28.2.md#bugs)**
+- **[Credits](release-notes/5.28.2.md#credits)**
+- **[Feedback](release-notes/5.28.2.md#feedback)**
+
 ## CiviCRM 5.28.1
 
 Released August 19, 2020
diff --git a/civicrm/release-notes/5.28.2.md b/civicrm/release-notes/5.28.2.md
new file mode 100644
index 0000000000..de0aaffd60
--- /dev/null
+++ b/civicrm/release-notes/5.28.2.md
@@ -0,0 +1,40 @@
+# CiviCRM 5.28.2
+
+Released August 20, 2020
+
+- **[Synopsis](#synopsis)**
+- **[Bugs resolved](#bugs)**
+- **[Credits](#credits)**
+- **[Feedback](#feedback)**
+
+## <a name="synopsis"></a>Synopsis
+
+| *Does this version...?*                                         |         |
+|:--------------------------------------------------------------- |:-------:|
+| Fix security vulnerabilities?                                   |   no    |
+| Change the database schema?                                     |   no    |
+| Alter the API?                                                  |   no    |
+| Require attention to configuration options?                     |   no    |
+| **Fix problems installing or upgrading to a previous version?** | **yes** |
+| Introduce features?                                             |   no    |
+| Fix bugs?                                                       |   no    |
+
+## <a name="bugs"></a>Bugs resolved
+
+
+* **_Upgrade_: Fix fatal error affecting some upgrades ([dev/core#1846](https://lab.civicrm.org/dev/core/-/issues/1846): [#18201](https://github.com/civicrm/civicrm-core/pull/18201))**
+
+  This patch was originally published in `5.27.1`. However, it was not initially ported to the concurrent `5.28.beta1`.
+
+## <a name="credits"></a>Credits
+
+This release was developed by the following authors and reviewers:
+
+JMA Consulting - Seamus Lee; CiviCRM - Tim Otten; Blackfly Solutions - Alan
+Dixon; Agileware - Justin Freeman
+
+## <a name="feedback"></a>Feedback
+
+These release notes are edited by Tim Otten and Andrew Hunt.  If you'd like to
+provide feedback on them, please login to https://chat.civicrm.org/civicrm and
+contact `@agh1`.
diff --git a/civicrm/sql/civicrm_data.mysql b/civicrm/sql/civicrm_data.mysql
index 9a30bb9939..13f3b10d4b 100644
--- a/civicrm/sql/civicrm_data.mysql
+++ b/civicrm/sql/civicrm_data.mysql
@@ -23897,4 +23897,4 @@ INSERT INTO `civicrm_report_instance`
     ( `domain_id`, `title`, `report_id`, `description`, `permission`, `form_values`)
 VALUES
     (  @domainID, 'Survey Details', 'survey/detail', 'Detailed report for canvassing, phone-banking, walk lists or other surveys.', 'access CiviReport', 'a:39:{s:6:"fields";a:2:{s:9:"sort_name";s:1:"1";s:6:"result";s:1:"1";}s:22:"assignee_contact_id_op";s:2:"eq";s:25:"assignee_contact_id_value";s:0:"";s:12:"sort_name_op";s:3:"has";s:15:"sort_name_value";s:0:"";s:17:"street_number_min";s:0:"";s:17:"street_number_max";s:0:"";s:16:"street_number_op";s:3:"lte";s:19:"street_number_value";s:0:"";s:14:"street_name_op";s:3:"has";s:17:"street_name_value";s:0:"";s:15:"postal_code_min";s:0:"";s:15:"postal_code_max";s:0:"";s:14:"postal_code_op";s:3:"lte";s:17:"postal_code_value";s:0:"";s:7:"city_op";s:3:"has";s:10:"city_value";s:0:"";s:20:"state_province_id_op";s:2:"in";s:23:"state_province_id_value";a:0:{}s:13:"country_id_op";s:2:"in";s:16:"country_id_value";a:0:{}s:12:"survey_id_op";s:2:"in";s:15:"survey_id_value";a:0:{}s:12:"status_id_op";s:2:"eq";s:15:"status_id_value";s:1:"1";s:11:"custom_1_op";s:2:"in";s:14:"custom_1_value";a:0:{}s:11:"custom_2_op";s:2:"in";s:14:"custom_2_value";a:0:{}s:17:"custom_3_relative";s:1:"0";s:13:"custom_3_from";s:0:"";s:11:"custom_3_to";s:0:"";s:11:"description";s:75:"Detailed report for canvassing, phone-banking, walk lists or other surveys.";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:17:"access CiviReport";s:6:"groups";s:0:"";s:9:"domain_id";i:1;}');
-UPDATE civicrm_domain SET version = '5.28.1';
+UPDATE civicrm_domain SET version = '5.28.2';
diff --git a/civicrm/sql/civicrm_generated.mysql b/civicrm/sql/civicrm_generated.mysql
index bbf0de2711..53ced0499b 100644
--- a/civicrm/sql/civicrm_generated.mysql
+++ b/civicrm/sql/civicrm_generated.mysql
@@ -399,7 +399,7 @@ UNLOCK TABLES;
 
 LOCK TABLES `civicrm_domain` WRITE;
 /*!40000 ALTER TABLE `civicrm_domain` DISABLE KEYS */;
-INSERT INTO `civicrm_domain` (`id`, `name`, `description`, `version`, `contact_id`, `locales`, `locale_custom_strings`) VALUES (1,'Default Domain Name',NULL,'5.28.1',1,NULL,'a:1:{s:5:\"en_US\";a:0:{}}');
+INSERT INTO `civicrm_domain` (`id`, `name`, `description`, `version`, `contact_id`, `locales`, `locale_custom_strings`) VALUES (1,'Default Domain Name',NULL,'5.28.2',1,NULL,'a:1:{s:5:\"en_US\";a:0:{}}');
 /*!40000 ALTER TABLE `civicrm_domain` ENABLE KEYS */;
 UNLOCK TABLES;
 
diff --git a/civicrm/vendor/autoload.php b/civicrm/vendor/autoload.php
index fd2598911f..23ceec17e4 100644
--- a/civicrm/vendor/autoload.php
+++ b/civicrm/vendor/autoload.php
@@ -4,4 +4,4 @@
 
 require_once __DIR__ . '/composer/autoload_real.php';
 
-return ComposerAutoloaderInitcab70146bb388b68615bda3f614d51ef::getLoader();
+return ComposerAutoloaderInitbffa0af82b6cfe5255f87c69436476fb::getLoader();
diff --git a/civicrm/vendor/composer/autoload_real.php b/civicrm/vendor/composer/autoload_real.php
index db59d6b9be..aa6a8629c7 100644
--- a/civicrm/vendor/composer/autoload_real.php
+++ b/civicrm/vendor/composer/autoload_real.php
@@ -2,7 +2,7 @@
 
 // autoload_real.php @generated by Composer
 
-class ComposerAutoloaderInitcab70146bb388b68615bda3f614d51ef
+class ComposerAutoloaderInitbffa0af82b6cfe5255f87c69436476fb
 {
     private static $loader;
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitcab70146bb388b68615bda3f614d51ef
             return self::$loader;
         }
 
-        spl_autoload_register(array('ComposerAutoloaderInitcab70146bb388b68615bda3f614d51ef', 'loadClassLoader'), true, true);
+        spl_autoload_register(array('ComposerAutoloaderInitbffa0af82b6cfe5255f87c69436476fb', 'loadClassLoader'), true, true);
         self::$loader = $loader = new \Composer\Autoload\ClassLoader();
-        spl_autoload_unregister(array('ComposerAutoloaderInitcab70146bb388b68615bda3f614d51ef', 'loadClassLoader'));
+        spl_autoload_unregister(array('ComposerAutoloaderInitbffa0af82b6cfe5255f87c69436476fb', 'loadClassLoader'));
 
         $includePaths = require __DIR__ . '/include_paths.php';
         $includePaths[] = get_include_path();
@@ -31,7 +31,7 @@ class ComposerAutoloaderInitcab70146bb388b68615bda3f614d51ef
         if ($useStaticLoader) {
             require_once __DIR__ . '/autoload_static.php';
 
-            call_user_func(\Composer\Autoload\ComposerStaticInitcab70146bb388b68615bda3f614d51ef::getInitializer($loader));
+            call_user_func(\Composer\Autoload\ComposerStaticInitbffa0af82b6cfe5255f87c69436476fb::getInitializer($loader));
         } else {
             $map = require __DIR__ . '/autoload_namespaces.php';
             foreach ($map as $namespace => $path) {
@@ -52,19 +52,19 @@ class ComposerAutoloaderInitcab70146bb388b68615bda3f614d51ef
         $loader->register(true);
 
         if ($useStaticLoader) {
-            $includeFiles = Composer\Autoload\ComposerStaticInitcab70146bb388b68615bda3f614d51ef::$files;
+            $includeFiles = Composer\Autoload\ComposerStaticInitbffa0af82b6cfe5255f87c69436476fb::$files;
         } else {
             $includeFiles = require __DIR__ . '/autoload_files.php';
         }
         foreach ($includeFiles as $fileIdentifier => $file) {
-            composerRequirecab70146bb388b68615bda3f614d51ef($fileIdentifier, $file);
+            composerRequirebffa0af82b6cfe5255f87c69436476fb($fileIdentifier, $file);
         }
 
         return $loader;
     }
 }
 
-function composerRequirecab70146bb388b68615bda3f614d51ef($fileIdentifier, $file)
+function composerRequirebffa0af82b6cfe5255f87c69436476fb($fileIdentifier, $file)
 {
     if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
         require $file;
diff --git a/civicrm/vendor/composer/autoload_static.php b/civicrm/vendor/composer/autoload_static.php
index 98f3adb753..f372450d74 100644
--- a/civicrm/vendor/composer/autoload_static.php
+++ b/civicrm/vendor/composer/autoload_static.php
@@ -4,7 +4,7 @@
 
 namespace Composer\Autoload;
 
-class ComposerStaticInitcab70146bb388b68615bda3f614d51ef
+class ComposerStaticInitbffa0af82b6cfe5255f87c69436476fb
 {
     public static $files = array (
         '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
@@ -530,11 +530,11 @@ class ComposerStaticInitcab70146bb388b68615bda3f614d51ef
     public static function getInitializer(ClassLoader $loader)
     {
         return \Closure::bind(function () use ($loader) {
-            $loader->prefixLengthsPsr4 = ComposerStaticInitcab70146bb388b68615bda3f614d51ef::$prefixLengthsPsr4;
-            $loader->prefixDirsPsr4 = ComposerStaticInitcab70146bb388b68615bda3f614d51ef::$prefixDirsPsr4;
-            $loader->prefixesPsr0 = ComposerStaticInitcab70146bb388b68615bda3f614d51ef::$prefixesPsr0;
-            $loader->fallbackDirsPsr0 = ComposerStaticInitcab70146bb388b68615bda3f614d51ef::$fallbackDirsPsr0;
-            $loader->classMap = ComposerStaticInitcab70146bb388b68615bda3f614d51ef::$classMap;
+            $loader->prefixLengthsPsr4 = ComposerStaticInitbffa0af82b6cfe5255f87c69436476fb::$prefixLengthsPsr4;
+            $loader->prefixDirsPsr4 = ComposerStaticInitbffa0af82b6cfe5255f87c69436476fb::$prefixDirsPsr4;
+            $loader->prefixesPsr0 = ComposerStaticInitbffa0af82b6cfe5255f87c69436476fb::$prefixesPsr0;
+            $loader->fallbackDirsPsr0 = ComposerStaticInitbffa0af82b6cfe5255f87c69436476fb::$fallbackDirsPsr0;
+            $loader->classMap = ComposerStaticInitbffa0af82b6cfe5255f87c69436476fb::$classMap;
 
         }, null, ClassLoader::class);
     }
diff --git a/civicrm/xml/version.xml b/civicrm/xml/version.xml
index 846f4a4abe..ca1b536c2b 100644
--- a/civicrm/xml/version.xml
+++ b/civicrm/xml/version.xml
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="iso-8859-1" ?>
 <version>
-  <version_no>5.28.1</version_no>
+  <version_no>5.28.2</version_no>
 </version>
-- 
GitLab