Skip to content
This repository has been archived by the owner on Jul 19, 2022. It is now read-only.

Commit

Permalink
Core overrides for 5.27
Browse files Browse the repository at this point in the history
  • Loading branch information
Edzelopez committed Jul 20, 2020
1 parent f00da4d commit 77f342a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 22 deletions.
14 changes: 7 additions & 7 deletions CRM/Core/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public function __construct(

parent::__construct($name, $modal);

$snippet = CRM_Utils_Array::value('snippet', $_REQUEST);
$snippet = $_REQUEST['snippet'] ?? NULL;
if ($snippet) {
if ($snippet == 3) {
$this->_print = CRM_Core_Smarty::PRINT_PDF;
Expand Down Expand Up @@ -284,7 +284,7 @@ public function key($name, $addSequence = FALSE, $ignoreKey = FALSE) {
return NULL;
}

$key = CRM_Utils_Array::value('qfKey', $_REQUEST, NULL);
$key = $_REQUEST['qfKey'] ?? NULL;
if (!$key && $_SERVER['REQUEST_METHOD'] === 'GET') {
$key = CRM_Core_Key::get($name, $addSequence);
}
Expand Down Expand Up @@ -417,8 +417,8 @@ public function addPages(&$stateMachine, $action = CRM_Core_Action::NONE) {
$pages = $stateMachine->getPages();
foreach ($pages as $name => $value) {
$className = CRM_Utils_Array::value('className', $value, $name);
$title = CRM_Utils_Array::value('title', $value);
$options = CRM_Utils_Array::value('options', $value);
$title = $value['title'] ?? NULL;
$options = $value['options'] ?? NULL;
$stateName = CRM_Utils_String::getClassName($className);
if (!empty($value['className'])) {
$formName = $name;
Expand Down Expand Up @@ -464,7 +464,7 @@ public function addPages(&$stateMachine, $action = CRM_Core_Action::NONE) {
*/
public function getButtonName() {
$data = &$this->container();
return CRM_Utils_Array::value('_qf_button_name', $data);
return $data['_qf_button_name'] ?? NULL;
}

/**
Expand Down Expand Up @@ -556,8 +556,8 @@ public function wizardHeader($currentPageName) {
public function addWizardStyle(&$wizard) {
$wizard['style'] = [
'barClass' => '',
'stepPrefixCurrent' => '»',
'stepPrefixPast' => '✔',
'stepPrefixCurrent' => '<i class="crm-i fa-chevron-right" aria-hidden="true"></i>&nbsp;',
'stepPrefixPast' => '<i class="crm-i fa-check" aria-hidden="true"></i>&nbsp;',
'stepPrefixFuture' => ' ',
'subStepPrefixCurrent' => '&nbsp;&nbsp;',
'subStepPrefixPast' => '&nbsp;&nbsp;',
Expand Down
6 changes: 3 additions & 3 deletions CRM/Core/Page/AJAX/Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public static function getPermissionedLocation() {
if (!empty($defaults)) {
foreach ($profileFields as $key => $val) {
if (array_key_exists($key, $defaults)) {
$htmlType = CRM_Utils_Array::value('html_type', $val);
$htmlType = $val['html_type'] ?? NULL;
if ($htmlType == 'Radio') {
$elements["onbehalf_{$key}"]['type'] = $htmlType;
$elements["onbehalf_{$key}"]['value'] = $defaults[$key];
Expand Down Expand Up @@ -233,7 +233,7 @@ public static function getLocBlock() {
$element = 'name';
}
$fld = "address[1][{$element}]";
$value = CRM_Utils_Array::value($element, $location['address'][1]);
$value = $location['address'][1][$element] ?? NULL;
$value = $value ? $value : "";
$result[str_replace([
'][',
Expand All @@ -251,7 +251,7 @@ public static function getLocBlock() {
$block = ($element == 'phone_type_id') ? 'phone' : $element;
for ($i = 1; $i < 3; $i++) {
$fld = "{$block}[{$i}][{$element}]";
$value = CRM_Utils_Array::value($element, $location[$block][$i]);
$value = $location[$block][$i][$element] ?? NULL;
$value = $value ? $value : "";
$result[str_replace([
'][',
Expand Down
6 changes: 1 addition & 5 deletions CRM/Grant/BAO/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@
*/

/**
*
* @package CRM
* @copyright CiviCRM LLC https://civicrm.org/licensing
* $Id$
*
* Class CRM_Grant_BAO_Query
*/
class CRM_Grant_BAO_Query extends CRM_Core_BAO_Query {

Expand Down
4 changes: 2 additions & 2 deletions CRM/UF/Page/ProfileEditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,11 @@ public static function convertCiviModelToBackboneModel($extends, $title, $availa
$sectionName = 'cg_' . $customGroup->id;
$section = [
'title' => ts('%1: %2', [1 => $title, 2 => $customGroup->title]),
'is_addable' => $customGroup->is_reserved ? FALSE : TRUE,
'is_addable' => !$customGroup->is_reserved,
'custom_group_id' => $customGroup->id,
'extends_entity_column_id' => $customGroup->extends_entity_column_id,
'extends_entity_column_value' => CRM_Utils_Array::explodePadded($customGroup->extends_entity_column_value),
'is_reserved' => $customGroup->is_reserved ? TRUE : FALSE,
'is_reserved' => (bool) $customGroup->is_reserved,
];
$result['sections'][$sectionName] = $section;
}
Expand Down
9 changes: 4 additions & 5 deletions info.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension key="biz.jmaconsulting.grantapplications" type="module">
<downloadUrl>https://github.com/JMAConsulting/biz.jmaconsulting.grantapplications/archive/1.6.2.zip</downloadUrl>
<downloadUrl>https://github.com/JMAConsulting/biz.jmaconsulting.grantapplications/archive/1.7.zip</downloadUrl>
<file>grantapplications</file>
<name>Grant Applications</name>
<description>This extension enhances profile creation for Grants. Applicants can submit online grant applications after filling in fields that are configured through CiviProfile. Core and custom grant fields can be added to CiviProfiles to collect information about various applicants that will be applying online for grants. Online grant application pages can be created and managed from the grant dashboard.</description>
Expand All @@ -16,12 +16,11 @@
<author>JMA Consulting</author>
<email>[email protected]</email>
</maintainer>
<releaseDate>2020-02-05</releaseDate>
<version>1.6.4</version>
<releaseDate>2020-07-20</releaseDate>
<version>1.7</version>
<develStage>stable</develStage>
<compatibility>
<ver>4.7</ver>
<ver>5.22</ver>
<ver>5.27</ver>
</compatibility>
<comments/>
<civix>
Expand Down

0 comments on commit 77f342a

Please sign in to comment.