SuiteCRM-Core/lib/Search/SearchResults.php

305 lines
9.5 KiB
PHP
Raw Normal View History

<?php
/**
* SugarCRM Community Edition is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
*
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
* Copyright (C) 2011 - 2021 SalesAgility Ltd.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
*/
namespace SuiteCRM\Search;
use BeanFactory;
use LoggerManager;
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
use SugarBean;
use SuiteCRM\Exception\Exception;
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
use SuiteCRM\Exception\InvalidArgumentException;
if (!defined('sugarEntry') || !sugarEntry) {
die('Not A Valid Entry Point');
}
/**
* Class SearchResults holds results and metadata of a search.
*
* @author Vittorio Iocolano
*/
class SearchResults
{
/** @var array Contains the results ids */
private $hits;
/** @var array Contains the scores of each hit. This should match in structure with $hits */
private $scores;
/** @var array Similar to scores, but customisable by the search engine */
private $options;
/** @var float The number of seconds it took to perform the search */
private $searchTime;
/** @var int The total number of hits (without pagination) */
private $total;
/** @var bool Flag specifying if the (nested) hits are grouped by the modules */
private $groupedByModule;
/**
* SearchResults constructor.
*
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
* @param array $hits Contains the results ids
* @param bool $groupedByModule Flag specifying if the (nested) hits are grouped by the modules
* @param float|null $searchTime The number of seconds it took to perform the search
* @param int|null $total The number of total hits (without pagination)
* @param array|null $scores Contains the scores of each hit. This should match in structure with $hits
* @param array|null $options Similar to scores, but customisable by the search engine
* @throws InvalidArgumentException
*/
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
public function __construct(
array $hits,
$groupedByModule = true,
float $searchTime = null,
int $total = null,
array $scores = null,
array $options = null
) {
$this->hits = $hits;
$this->scores = $scores;
$this->options = $options;
$this->groupedByModule = $groupedByModule;
$this->searchTime = $searchTime;
$this->total = $total;
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
if ($this->scores !== null && count($hits) !== count($scores)) {
throw new InvalidArgumentException('The sizes of $hits and $scores must match.');
}
}
/**
* Returns the results.
*
* Note that the structure of the results depends whether of not they have been nested by module or not.
*
* @return array
*/
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
public function getHits(): array
{
return $this->hits;
}
/**
* Fetches the results (originally just module->id) as Beans.
*
* @return array
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
* @throws Exception
* @see getHits()
*/
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
public function getHitsAsBeans(): array
{
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
$searchHits = $this->hits;
$parsed = [];
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
foreach ($searchHits as $module => $beans) {
foreach ((array)$beans as $bean) {
$obj = BeanFactory::getBean($module, $bean);
Squashed 'public/legacy/' changes from 817a12dc0c..f058c4c306 f058c4c306 Fix #9106 - Update securexss for backwards compatibility 05471a51f3 Update composer.lock dee3305fce 7.11.19 0952712425 Fix Calender display issues in FullCalender 3.10 91bfb1cf3a Fix #7999 - Prevent securitygroups mass assign damage e36e1a52f5 Fix #5624 - Make SWSPEditRoleButton::displayList compatible w. parent 8265b5e29b Fix #8571 - Remove duplicate code in users detailviewdefs f63f05a4a2 Fix #8514 - Implement effective opcache file clearing 5e671f3b1b Fix #8461, #8462 - PHP files are potentially overwritten 0b18500b42 Fix #8700 - Various problems in PHPDocs throughout the codebase. 25dce7954d Fix #9067 - Fix the drop down width 28eecb4198 Add Additional api filter option `like` 8b5a152f7f Add filters in relationship API 7a92e5ec8a Add Relationship Beans in V8 API Response c192ccdf2e Fix #9090 - User menu alignment 466f2d96e7 Fix #6051 - Modulebuilder labels edit fixes fe5ed90fd9 Update JQuery JS Library to v3.6.0 e0382c1a6c Update FullCalendar JS Library to v3.10.2 86882a4d4f Update YUI JS Library to 2.9.1 540245494b Fix #8999 - Hardcoded 'by' label in calls e4f3c6a2fb Fix #9034 - Business Hours does not work in non-english languages b0a51cc667 Fix #8910 - Update the V8 Api to allow for upload of documents similar to notes 8408cd8e91 Fix #9010 - Add missing 'view task' label on calendar faa46f5a4c Fix #8894 - Add missing label for calendar dashlet 5905f3d308 Fix #9032 - Prevent Notice Error During Import 5c9e8700ba Fix #8182 - Update updateTimeDateFields to handle undefined dates fc3dd03386 Fix #9075 - Removing deleted related beans via link 039d9a69d2 Fix #8988 - Improve upon solution which doesn't cache incomplete beans f562c57c8d Fix #7772 - Only index ElasticSearch when enabled dd1a5bc244 Fix #9101 LangText exception breaking ElasticSearch 0c861d3f1a Fix #8472 - No or not complete Searchresults using elasticsearch engine e4e884667c Fix #6800 - Elasticsearch: Elastic index name is hardcoded e525634d7b Fix #8916 - Misspelled elasticsearch labels 28d7afaa59 Fix #9080 - Update config for google/apiclient at composer.json 66bd8998ec Fix #9060 - Project Form action should not be changed if delete is not confirmed 06195fe5f1 Fix #8676 - New Scheduled Reports does not run 89341758e2 Fix #2645 - Calendar quick create ignores required fields a329377bc0 Deprecate PdfParser e5c03ad198 Deprecate advanced open discovery (AOD) git-subtree-dir: public/legacy git-subtree-split: f058c4c3062e7fff72cc2b62440bf064a63e6843
2021-05-20 11:54:15 +01:00
// if a search found a bean but suitecrm does not, it could happens
// maybe the bean is deleted but elsasticsearch is not re-indexing yet.
// so at this point we trying to rebuild the index and try again to get bean:
if (!$obj) {
ElasticSearch\ElasticSearchIndexer::repairElasticsearchIndex();
$obj = BeanFactory::getBean($module, $bean);
}
Squashed 'public/legacy/' changes from 817a12dc0c..f058c4c306 f058c4c306 Fix #9106 - Update securexss for backwards compatibility 05471a51f3 Update composer.lock dee3305fce 7.11.19 0952712425 Fix Calender display issues in FullCalender 3.10 91bfb1cf3a Fix #7999 - Prevent securitygroups mass assign damage e36e1a52f5 Fix #5624 - Make SWSPEditRoleButton::displayList compatible w. parent 8265b5e29b Fix #8571 - Remove duplicate code in users detailviewdefs f63f05a4a2 Fix #8514 - Implement effective opcache file clearing 5e671f3b1b Fix #8461, #8462 - PHP files are potentially overwritten 0b18500b42 Fix #8700 - Various problems in PHPDocs throughout the codebase. 25dce7954d Fix #9067 - Fix the drop down width 28eecb4198 Add Additional api filter option `like` 8b5a152f7f Add filters in relationship API 7a92e5ec8a Add Relationship Beans in V8 API Response c192ccdf2e Fix #9090 - User menu alignment 466f2d96e7 Fix #6051 - Modulebuilder labels edit fixes fe5ed90fd9 Update JQuery JS Library to v3.6.0 e0382c1a6c Update FullCalendar JS Library to v3.10.2 86882a4d4f Update YUI JS Library to 2.9.1 540245494b Fix #8999 - Hardcoded 'by' label in calls e4f3c6a2fb Fix #9034 - Business Hours does not work in non-english languages b0a51cc667 Fix #8910 - Update the V8 Api to allow for upload of documents similar to notes 8408cd8e91 Fix #9010 - Add missing 'view task' label on calendar faa46f5a4c Fix #8894 - Add missing label for calendar dashlet 5905f3d308 Fix #9032 - Prevent Notice Error During Import 5c9e8700ba Fix #8182 - Update updateTimeDateFields to handle undefined dates fc3dd03386 Fix #9075 - Removing deleted related beans via link 039d9a69d2 Fix #8988 - Improve upon solution which doesn't cache incomplete beans f562c57c8d Fix #7772 - Only index ElasticSearch when enabled dd1a5bc244 Fix #9101 LangText exception breaking ElasticSearch 0c861d3f1a Fix #8472 - No or not complete Searchresults using elasticsearch engine e4e884667c Fix #6800 - Elasticsearch: Elastic index name is hardcoded e525634d7b Fix #8916 - Misspelled elasticsearch labels 28d7afaa59 Fix #9080 - Update config for google/apiclient at composer.json 66bd8998ec Fix #9060 - Project Form action should not be changed if delete is not confirmed 06195fe5f1 Fix #8676 - New Scheduled Reports does not run 89341758e2 Fix #2645 - Calendar quick create ignores required fields a329377bc0 Deprecate PdfParser e5c03ad198 Deprecate advanced open discovery (AOD) git-subtree-dir: public/legacy git-subtree-split: f058c4c3062e7fff72cc2b62440bf064a63e6843
2021-05-20 11:54:15 +01:00
if (!$obj) {
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
throw new Exception('Error retrieving bean: ' . $module . ' [' . $bean . ']');
}
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
$obj->load_relationships();
$fieldDefs = $obj->getFieldDefinitions();
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
$parsed[$module][] = $this->updateFieldDefLinks($obj, $fieldDefs);
}
}
return $parsed;
}
Squashed 'public/legacy/' changes from 817a12dc0c..f058c4c306 f058c4c306 Fix #9106 - Update securexss for backwards compatibility 05471a51f3 Update composer.lock dee3305fce 7.11.19 0952712425 Fix Calender display issues in FullCalender 3.10 91bfb1cf3a Fix #7999 - Prevent securitygroups mass assign damage e36e1a52f5 Fix #5624 - Make SWSPEditRoleButton::displayList compatible w. parent 8265b5e29b Fix #8571 - Remove duplicate code in users detailviewdefs f63f05a4a2 Fix #8514 - Implement effective opcache file clearing 5e671f3b1b Fix #8461, #8462 - PHP files are potentially overwritten 0b18500b42 Fix #8700 - Various problems in PHPDocs throughout the codebase. 25dce7954d Fix #9067 - Fix the drop down width 28eecb4198 Add Additional api filter option `like` 8b5a152f7f Add filters in relationship API 7a92e5ec8a Add Relationship Beans in V8 API Response c192ccdf2e Fix #9090 - User menu alignment 466f2d96e7 Fix #6051 - Modulebuilder labels edit fixes fe5ed90fd9 Update JQuery JS Library to v3.6.0 e0382c1a6c Update FullCalendar JS Library to v3.10.2 86882a4d4f Update YUI JS Library to 2.9.1 540245494b Fix #8999 - Hardcoded 'by' label in calls e4f3c6a2fb Fix #9034 - Business Hours does not work in non-english languages b0a51cc667 Fix #8910 - Update the V8 Api to allow for upload of documents similar to notes 8408cd8e91 Fix #9010 - Add missing 'view task' label on calendar faa46f5a4c Fix #8894 - Add missing label for calendar dashlet 5905f3d308 Fix #9032 - Prevent Notice Error During Import 5c9e8700ba Fix #8182 - Update updateTimeDateFields to handle undefined dates fc3dd03386 Fix #9075 - Removing deleted related beans via link 039d9a69d2 Fix #8988 - Improve upon solution which doesn't cache incomplete beans f562c57c8d Fix #7772 - Only index ElasticSearch when enabled dd1a5bc244 Fix #9101 LangText exception breaking ElasticSearch 0c861d3f1a Fix #8472 - No or not complete Searchresults using elasticsearch engine e4e884667c Fix #6800 - Elasticsearch: Elastic index name is hardcoded e525634d7b Fix #8916 - Misspelled elasticsearch labels 28d7afaa59 Fix #9080 - Update config for google/apiclient at composer.json 66bd8998ec Fix #9060 - Project Form action should not be changed if delete is not confirmed 06195fe5f1 Fix #8676 - New Scheduled Reports does not run 89341758e2 Fix #2645 - Calendar quick create ignores required fields a329377bc0 Deprecate PdfParser e5c03ad198 Deprecate advanced open discovery (AOD) git-subtree-dir: public/legacy git-subtree-split: f058c4c3062e7fff72cc2b62440bf064a63e6843
2021-05-20 11:54:15 +01:00
/**
*
* @param SugarBean $obj
* @param array $fieldDefs
* @return SugarBean
*/
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
protected function updateFieldDefLinks(SugarBean $obj, array $fieldDefs): SugarBean
{
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
foreach ($fieldDefs as $fieldDef) {
if (isset($obj->{$fieldDef['name']})) {
$obj = $this->updateObjLinks($obj, $fieldDef);
}
}
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
return $obj;
}
Squashed 'public/legacy/' changes from 817a12dc0c..f058c4c306 f058c4c306 Fix #9106 - Update securexss for backwards compatibility 05471a51f3 Update composer.lock dee3305fce 7.11.19 0952712425 Fix Calender display issues in FullCalender 3.10 91bfb1cf3a Fix #7999 - Prevent securitygroups mass assign damage e36e1a52f5 Fix #5624 - Make SWSPEditRoleButton::displayList compatible w. parent 8265b5e29b Fix #8571 - Remove duplicate code in users detailviewdefs f63f05a4a2 Fix #8514 - Implement effective opcache file clearing 5e671f3b1b Fix #8461, #8462 - PHP files are potentially overwritten 0b18500b42 Fix #8700 - Various problems in PHPDocs throughout the codebase. 25dce7954d Fix #9067 - Fix the drop down width 28eecb4198 Add Additional api filter option `like` 8b5a152f7f Add filters in relationship API 7a92e5ec8a Add Relationship Beans in V8 API Response c192ccdf2e Fix #9090 - User menu alignment 466f2d96e7 Fix #6051 - Modulebuilder labels edit fixes fe5ed90fd9 Update JQuery JS Library to v3.6.0 e0382c1a6c Update FullCalendar JS Library to v3.10.2 86882a4d4f Update YUI JS Library to 2.9.1 540245494b Fix #8999 - Hardcoded 'by' label in calls e4f3c6a2fb Fix #9034 - Business Hours does not work in non-english languages b0a51cc667 Fix #8910 - Update the V8 Api to allow for upload of documents similar to notes 8408cd8e91 Fix #9010 - Add missing 'view task' label on calendar faa46f5a4c Fix #8894 - Add missing label for calendar dashlet 5905f3d308 Fix #9032 - Prevent Notice Error During Import 5c9e8700ba Fix #8182 - Update updateTimeDateFields to handle undefined dates fc3dd03386 Fix #9075 - Removing deleted related beans via link 039d9a69d2 Fix #8988 - Improve upon solution which doesn't cache incomplete beans f562c57c8d Fix #7772 - Only index ElasticSearch when enabled dd1a5bc244 Fix #9101 LangText exception breaking ElasticSearch 0c861d3f1a Fix #8472 - No or not complete Searchresults using elasticsearch engine e4e884667c Fix #6800 - Elasticsearch: Elastic index name is hardcoded e525634d7b Fix #8916 - Misspelled elasticsearch labels 28d7afaa59 Fix #9080 - Update config for google/apiclient at composer.json 66bd8998ec Fix #9060 - Project Form action should not be changed if delete is not confirmed 06195fe5f1 Fix #8676 - New Scheduled Reports does not run 89341758e2 Fix #2645 - Calendar quick create ignores required fields a329377bc0 Deprecate PdfParser e5c03ad198 Deprecate advanced open discovery (AOD) git-subtree-dir: public/legacy git-subtree-split: f058c4c3062e7fff72cc2b62440bf064a63e6843
2021-05-20 11:54:15 +01:00
/**
* Update related links in a bean to show it on results page
*
* @param SugarBean $obj
* @param array $fieldDef
* @return SugarBean
*/
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
protected function updateObjLinks(SugarBean $obj, array $fieldDef): SugarBean
{
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
if (isset($fieldDef['link']) && !empty($fieldDef['id_name']) && $fieldDef['type'] === 'relate') {
$relId = $this->getRelatedId($obj, $fieldDef['id_name'], $fieldDef['link']);
Squashed 'public/legacy/' changes from 817a12dc0c..f058c4c306 f058c4c306 Fix #9106 - Update securexss for backwards compatibility 05471a51f3 Update composer.lock dee3305fce 7.11.19 0952712425 Fix Calender display issues in FullCalender 3.10 91bfb1cf3a Fix #7999 - Prevent securitygroups mass assign damage e36e1a52f5 Fix #5624 - Make SWSPEditRoleButton::displayList compatible w. parent 8265b5e29b Fix #8571 - Remove duplicate code in users detailviewdefs f63f05a4a2 Fix #8514 - Implement effective opcache file clearing 5e671f3b1b Fix #8461, #8462 - PHP files are potentially overwritten 0b18500b42 Fix #8700 - Various problems in PHPDocs throughout the codebase. 25dce7954d Fix #9067 - Fix the drop down width 28eecb4198 Add Additional api filter option `like` 8b5a152f7f Add filters in relationship API 7a92e5ec8a Add Relationship Beans in V8 API Response c192ccdf2e Fix #9090 - User menu alignment 466f2d96e7 Fix #6051 - Modulebuilder labels edit fixes fe5ed90fd9 Update JQuery JS Library to v3.6.0 e0382c1a6c Update FullCalendar JS Library to v3.10.2 86882a4d4f Update YUI JS Library to 2.9.1 540245494b Fix #8999 - Hardcoded 'by' label in calls e4f3c6a2fb Fix #9034 - Business Hours does not work in non-english languages b0a51cc667 Fix #8910 - Update the V8 Api to allow for upload of documents similar to notes 8408cd8e91 Fix #9010 - Add missing 'view task' label on calendar faa46f5a4c Fix #8894 - Add missing label for calendar dashlet 5905f3d308 Fix #9032 - Prevent Notice Error During Import 5c9e8700ba Fix #8182 - Update updateTimeDateFields to handle undefined dates fc3dd03386 Fix #9075 - Removing deleted related beans via link 039d9a69d2 Fix #8988 - Improve upon solution which doesn't cache incomplete beans f562c57c8d Fix #7772 - Only index ElasticSearch when enabled dd1a5bc244 Fix #9101 LangText exception breaking ElasticSearch 0c861d3f1a Fix #8472 - No or not complete Searchresults using elasticsearch engine e4e884667c Fix #6800 - Elasticsearch: Elastic index name is hardcoded e525634d7b Fix #8916 - Misspelled elasticsearch labels 28d7afaa59 Fix #9080 - Update config for google/apiclient at composer.json 66bd8998ec Fix #9060 - Project Form action should not be changed if delete is not confirmed 06195fe5f1 Fix #8676 - New Scheduled Reports does not run 89341758e2 Fix #2645 - Calendar quick create ignores required fields a329377bc0 Deprecate PdfParser e5c03ad198 Deprecate advanced open discovery (AOD) git-subtree-dir: public/legacy git-subtree-split: f058c4c3062e7fff72cc2b62440bf064a63e6843
2021-05-20 11:54:15 +01:00
if (!empty($relId)) {
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
$obj->{$fieldDef['name']} = $this->getLink(
$obj->{$fieldDef['name']},
$fieldDef['module'],
$relId,
'DetailView'
);
Squashed 'public/legacy/' changes from 817a12dc0c..f058c4c306 f058c4c306 Fix #9106 - Update securexss for backwards compatibility 05471a51f3 Update composer.lock dee3305fce 7.11.19 0952712425 Fix Calender display issues in FullCalender 3.10 91bfb1cf3a Fix #7999 - Prevent securitygroups mass assign damage e36e1a52f5 Fix #5624 - Make SWSPEditRoleButton::displayList compatible w. parent 8265b5e29b Fix #8571 - Remove duplicate code in users detailviewdefs f63f05a4a2 Fix #8514 - Implement effective opcache file clearing 5e671f3b1b Fix #8461, #8462 - PHP files are potentially overwritten 0b18500b42 Fix #8700 - Various problems in PHPDocs throughout the codebase. 25dce7954d Fix #9067 - Fix the drop down width 28eecb4198 Add Additional api filter option `like` 8b5a152f7f Add filters in relationship API 7a92e5ec8a Add Relationship Beans in V8 API Response c192ccdf2e Fix #9090 - User menu alignment 466f2d96e7 Fix #6051 - Modulebuilder labels edit fixes fe5ed90fd9 Update JQuery JS Library to v3.6.0 e0382c1a6c Update FullCalendar JS Library to v3.10.2 86882a4d4f Update YUI JS Library to 2.9.1 540245494b Fix #8999 - Hardcoded 'by' label in calls e4f3c6a2fb Fix #9034 - Business Hours does not work in non-english languages b0a51cc667 Fix #8910 - Update the V8 Api to allow for upload of documents similar to notes 8408cd8e91 Fix #9010 - Add missing 'view task' label on calendar faa46f5a4c Fix #8894 - Add missing label for calendar dashlet 5905f3d308 Fix #9032 - Prevent Notice Error During Import 5c9e8700ba Fix #8182 - Update updateTimeDateFields to handle undefined dates fc3dd03386 Fix #9075 - Removing deleted related beans via link 039d9a69d2 Fix #8988 - Improve upon solution which doesn't cache incomplete beans f562c57c8d Fix #7772 - Only index ElasticSearch when enabled dd1a5bc244 Fix #9101 LangText exception breaking ElasticSearch 0c861d3f1a Fix #8472 - No or not complete Searchresults using elasticsearch engine e4e884667c Fix #6800 - Elasticsearch: Elastic index name is hardcoded e525634d7b Fix #8916 - Misspelled elasticsearch labels 28d7afaa59 Fix #9080 - Update config for google/apiclient at composer.json 66bd8998ec Fix #9060 - Project Form action should not be changed if delete is not confirmed 06195fe5f1 Fix #8676 - New Scheduled Reports does not run 89341758e2 Fix #2645 - Calendar quick create ignores required fields a329377bc0 Deprecate PdfParser e5c03ad198 Deprecate advanced open discovery (AOD) git-subtree-dir: public/legacy git-subtree-split: f058c4c3062e7fff72cc2b62440bf064a63e6843
2021-05-20 11:54:15 +01:00
}
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
} elseif ($fieldDef['name'] === 'name') {
$obj->{$fieldDef['name']} = $this->getLink(
$obj->{$fieldDef['name']},
$obj->module_name,
$obj->id,
'DetailView'
);
}
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
return $obj;
}
Squashed 'public/legacy/' changes from 817a12dc0c..f058c4c306 f058c4c306 Fix #9106 - Update securexss for backwards compatibility 05471a51f3 Update composer.lock dee3305fce 7.11.19 0952712425 Fix Calender display issues in FullCalender 3.10 91bfb1cf3a Fix #7999 - Prevent securitygroups mass assign damage e36e1a52f5 Fix #5624 - Make SWSPEditRoleButton::displayList compatible w. parent 8265b5e29b Fix #8571 - Remove duplicate code in users detailviewdefs f63f05a4a2 Fix #8514 - Implement effective opcache file clearing 5e671f3b1b Fix #8461, #8462 - PHP files are potentially overwritten 0b18500b42 Fix #8700 - Various problems in PHPDocs throughout the codebase. 25dce7954d Fix #9067 - Fix the drop down width 28eecb4198 Add Additional api filter option `like` 8b5a152f7f Add filters in relationship API 7a92e5ec8a Add Relationship Beans in V8 API Response c192ccdf2e Fix #9090 - User menu alignment 466f2d96e7 Fix #6051 - Modulebuilder labels edit fixes fe5ed90fd9 Update JQuery JS Library to v3.6.0 e0382c1a6c Update FullCalendar JS Library to v3.10.2 86882a4d4f Update YUI JS Library to 2.9.1 540245494b Fix #8999 - Hardcoded 'by' label in calls e4f3c6a2fb Fix #9034 - Business Hours does not work in non-english languages b0a51cc667 Fix #8910 - Update the V8 Api to allow for upload of documents similar to notes 8408cd8e91 Fix #9010 - Add missing 'view task' label on calendar faa46f5a4c Fix #8894 - Add missing label for calendar dashlet 5905f3d308 Fix #9032 - Prevent Notice Error During Import 5c9e8700ba Fix #8182 - Update updateTimeDateFields to handle undefined dates fc3dd03386 Fix #9075 - Removing deleted related beans via link 039d9a69d2 Fix #8988 - Improve upon solution which doesn't cache incomplete beans f562c57c8d Fix #7772 - Only index ElasticSearch when enabled dd1a5bc244 Fix #9101 LangText exception breaking ElasticSearch 0c861d3f1a Fix #8472 - No or not complete Searchresults using elasticsearch engine e4e884667c Fix #6800 - Elasticsearch: Elastic index name is hardcoded e525634d7b Fix #8916 - Misspelled elasticsearch labels 28d7afaa59 Fix #9080 - Update config for google/apiclient at composer.json 66bd8998ec Fix #9060 - Project Form action should not be changed if delete is not confirmed 06195fe5f1 Fix #8676 - New Scheduled Reports does not run 89341758e2 Fix #2645 - Calendar quick create ignores required fields a329377bc0 Deprecate PdfParser e5c03ad198 Deprecate advanced open discovery (AOD) git-subtree-dir: public/legacy git-subtree-split: f058c4c3062e7fff72cc2b62440bf064a63e6843
2021-05-20 11:54:15 +01:00
/**
* resolve related record ID
*
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
* @param SugarBean $obj
* @param string $idName
* @param string $link
* @return null|string
*/
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
protected function getRelatedId(SugarBean $obj, string $idName, string $link): string
{
$relField = $idName;
if (isset($obj->$link)) {
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
$relId = $obj->$link->getFocus()->$relField;
Squashed 'public/legacy/' changes from 817a12dc0c..f058c4c306 f058c4c306 Fix #9106 - Update securexss for backwards compatibility 05471a51f3 Update composer.lock dee3305fce 7.11.19 0952712425 Fix Calender display issues in FullCalender 3.10 91bfb1cf3a Fix #7999 - Prevent securitygroups mass assign damage e36e1a52f5 Fix #5624 - Make SWSPEditRoleButton::displayList compatible w. parent 8265b5e29b Fix #8571 - Remove duplicate code in users detailviewdefs f63f05a4a2 Fix #8514 - Implement effective opcache file clearing 5e671f3b1b Fix #8461, #8462 - PHP files are potentially overwritten 0b18500b42 Fix #8700 - Various problems in PHPDocs throughout the codebase. 25dce7954d Fix #9067 - Fix the drop down width 28eecb4198 Add Additional api filter option `like` 8b5a152f7f Add filters in relationship API 7a92e5ec8a Add Relationship Beans in V8 API Response c192ccdf2e Fix #9090 - User menu alignment 466f2d96e7 Fix #6051 - Modulebuilder labels edit fixes fe5ed90fd9 Update JQuery JS Library to v3.6.0 e0382c1a6c Update FullCalendar JS Library to v3.10.2 86882a4d4f Update YUI JS Library to 2.9.1 540245494b Fix #8999 - Hardcoded 'by' label in calls e4f3c6a2fb Fix #9034 - Business Hours does not work in non-english languages b0a51cc667 Fix #8910 - Update the V8 Api to allow for upload of documents similar to notes 8408cd8e91 Fix #9010 - Add missing 'view task' label on calendar faa46f5a4c Fix #8894 - Add missing label for calendar dashlet 5905f3d308 Fix #9032 - Prevent Notice Error During Import 5c9e8700ba Fix #8182 - Update updateTimeDateFields to handle undefined dates fc3dd03386 Fix #9075 - Removing deleted related beans via link 039d9a69d2 Fix #8988 - Improve upon solution which doesn't cache incomplete beans f562c57c8d Fix #7772 - Only index ElasticSearch when enabled dd1a5bc244 Fix #9101 LangText exception breaking ElasticSearch 0c861d3f1a Fix #8472 - No or not complete Searchresults using elasticsearch engine e4e884667c Fix #6800 - Elasticsearch: Elastic index name is hardcoded e525634d7b Fix #8916 - Misspelled elasticsearch labels 28d7afaa59 Fix #9080 - Update config for google/apiclient at composer.json 66bd8998ec Fix #9060 - Project Form action should not be changed if delete is not confirmed 06195fe5f1 Fix #8676 - New Scheduled Reports does not run 89341758e2 Fix #2645 - Calendar quick create ignores required fields a329377bc0 Deprecate PdfParser e5c03ad198 Deprecate advanced open discovery (AOD) git-subtree-dir: public/legacy git-subtree-split: f058c4c3062e7fff72cc2b62440bf064a63e6843
2021-05-20 11:54:15 +01:00
if (is_object($relId)) {
if (method_exists($relId, "getFocus")) {
$relId = $relId->getFocus()->id;
} else {
$relId = null;
}
}
} elseif (isset($obj->$relField)) {
$relId = $obj->$relField;
} else {
Squashed 'public/legacy/' changes from 817a12dc0c..f058c4c306 f058c4c306 Fix #9106 - Update securexss for backwards compatibility 05471a51f3 Update composer.lock dee3305fce 7.11.19 0952712425 Fix Calender display issues in FullCalender 3.10 91bfb1cf3a Fix #7999 - Prevent securitygroups mass assign damage e36e1a52f5 Fix #5624 - Make SWSPEditRoleButton::displayList compatible w. parent 8265b5e29b Fix #8571 - Remove duplicate code in users detailviewdefs f63f05a4a2 Fix #8514 - Implement effective opcache file clearing 5e671f3b1b Fix #8461, #8462 - PHP files are potentially overwritten 0b18500b42 Fix #8700 - Various problems in PHPDocs throughout the codebase. 25dce7954d Fix #9067 - Fix the drop down width 28eecb4198 Add Additional api filter option `like` 8b5a152f7f Add filters in relationship API 7a92e5ec8a Add Relationship Beans in V8 API Response c192ccdf2e Fix #9090 - User menu alignment 466f2d96e7 Fix #6051 - Modulebuilder labels edit fixes fe5ed90fd9 Update JQuery JS Library to v3.6.0 e0382c1a6c Update FullCalendar JS Library to v3.10.2 86882a4d4f Update YUI JS Library to 2.9.1 540245494b Fix #8999 - Hardcoded 'by' label in calls e4f3c6a2fb Fix #9034 - Business Hours does not work in non-english languages b0a51cc667 Fix #8910 - Update the V8 Api to allow for upload of documents similar to notes 8408cd8e91 Fix #9010 - Add missing 'view task' label on calendar faa46f5a4c Fix #8894 - Add missing label for calendar dashlet 5905f3d308 Fix #9032 - Prevent Notice Error During Import 5c9e8700ba Fix #8182 - Update updateTimeDateFields to handle undefined dates fc3dd03386 Fix #9075 - Removing deleted related beans via link 039d9a69d2 Fix #8988 - Improve upon solution which doesn't cache incomplete beans f562c57c8d Fix #7772 - Only index ElasticSearch when enabled dd1a5bc244 Fix #9101 LangText exception breaking ElasticSearch 0c861d3f1a Fix #8472 - No or not complete Searchresults using elasticsearch engine e4e884667c Fix #6800 - Elasticsearch: Elastic index name is hardcoded e525634d7b Fix #8916 - Misspelled elasticsearch labels 28d7afaa59 Fix #9080 - Update config for google/apiclient at composer.json 66bd8998ec Fix #9060 - Project Form action should not be changed if delete is not confirmed 06195fe5f1 Fix #8676 - New Scheduled Reports does not run 89341758e2 Fix #2645 - Calendar quick create ignores required fields a329377bc0 Deprecate PdfParser e5c03ad198 Deprecate advanced open discovery (AOD) git-subtree-dir: public/legacy git-subtree-split: f058c4c3062e7fff72cc2b62440bf064a63e6843
2021-05-20 11:54:15 +01:00
$relId = null;
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
LoggerManager::getLogger()->warn('Unresolved related ID for field: ' . $relField);
}
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
if (!$relId) {
$relId = '';
}
return $relId;
}
Squashed 'public/legacy/' changes from 817a12dc0c..f058c4c306 f058c4c306 Fix #9106 - Update securexss for backwards compatibility 05471a51f3 Update composer.lock dee3305fce 7.11.19 0952712425 Fix Calender display issues in FullCalender 3.10 91bfb1cf3a Fix #7999 - Prevent securitygroups mass assign damage e36e1a52f5 Fix #5624 - Make SWSPEditRoleButton::displayList compatible w. parent 8265b5e29b Fix #8571 - Remove duplicate code in users detailviewdefs f63f05a4a2 Fix #8514 - Implement effective opcache file clearing 5e671f3b1b Fix #8461, #8462 - PHP files are potentially overwritten 0b18500b42 Fix #8700 - Various problems in PHPDocs throughout the codebase. 25dce7954d Fix #9067 - Fix the drop down width 28eecb4198 Add Additional api filter option `like` 8b5a152f7f Add filters in relationship API 7a92e5ec8a Add Relationship Beans in V8 API Response c192ccdf2e Fix #9090 - User menu alignment 466f2d96e7 Fix #6051 - Modulebuilder labels edit fixes fe5ed90fd9 Update JQuery JS Library to v3.6.0 e0382c1a6c Update FullCalendar JS Library to v3.10.2 86882a4d4f Update YUI JS Library to 2.9.1 540245494b Fix #8999 - Hardcoded 'by' label in calls e4f3c6a2fb Fix #9034 - Business Hours does not work in non-english languages b0a51cc667 Fix #8910 - Update the V8 Api to allow for upload of documents similar to notes 8408cd8e91 Fix #9010 - Add missing 'view task' label on calendar faa46f5a4c Fix #8894 - Add missing label for calendar dashlet 5905f3d308 Fix #9032 - Prevent Notice Error During Import 5c9e8700ba Fix #8182 - Update updateTimeDateFields to handle undefined dates fc3dd03386 Fix #9075 - Removing deleted related beans via link 039d9a69d2 Fix #8988 - Improve upon solution which doesn't cache incomplete beans f562c57c8d Fix #7772 - Only index ElasticSearch when enabled dd1a5bc244 Fix #9101 LangText exception breaking ElasticSearch 0c861d3f1a Fix #8472 - No or not complete Searchresults using elasticsearch engine e4e884667c Fix #6800 - Elasticsearch: Elastic index name is hardcoded e525634d7b Fix #8916 - Misspelled elasticsearch labels 28d7afaa59 Fix #9080 - Update config for google/apiclient at composer.json 66bd8998ec Fix #9060 - Project Form action should not be changed if delete is not confirmed 06195fe5f1 Fix #8676 - New Scheduled Reports does not run 89341758e2 Fix #2645 - Calendar quick create ignores required fields a329377bc0 Deprecate PdfParser e5c03ad198 Deprecate advanced open discovery (AOD) git-subtree-dir: public/legacy git-subtree-split: f058c4c3062e7fff72cc2b62440bf064a63e6843
2021-05-20 11:54:15 +01:00
/**
*
* @param string $label
* @param string $module
* @param string $record
* @param string $action
* @return string
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
* @global array $sugar_config
*/
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
protected function getLink(string $label, string $module, string $record, string $action): string
{
global $sugar_config;
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
return "<a href=\"{$sugar_config['site_url']}/index.php?action={$action}&module={$module}&record={$record}&offset=1\"><span>{$label}</span></a>";
}
/**
* Returns an arbitrary scores defining how much related a hit is to the query.
*
* @return array
*/
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
public function getScores(): ?array
{
return $this->scores;
}
/**
* Returns the total number of hits (without pagination).
*
* @return int
*/
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
public function getTotal(): ?int
{
return $this->total;
}
/**
* @return array
*/
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
public function getOptions(): ?array
{
return $this->options;
}
/**
* @param string $key
*
* @return array
*/
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
public function getOption(string $key): array
{
return $this->options[$key];
}
/**
* Time in seconds it took to perform the search.
*
* @return float
*/
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
public function getSearchTime(): ?float
{
return $this->searchTime;
}
/**
* @return bool
*/
Squashed 'public/legacy/' changes from f058c4c306..2aaee3c558 2aaee3c558 Implement PDFEngine bf78e964fd Fix PDF_Lib constructors cfe6e2a1e0 Replace deprecated fzaninotto/faker with fakerphp/faker 7f8d18b8fb Move test namespaces into autoload-dev 1778603d07 Upgrade nesbot/carbon to v2.x 171ef65335 Update Travis config to use composer v2.x 7a4d0007af Upgrade composer-merge-plugin to v2.x 0461d8f4ba Fix PHPUnit 9 deprecations and warnings 15906ef6a5 Fix test case class not matching filename deprecation warnings b92a9dcdbd Replace abandoned leafo/scssphp with scssphp/scssphp 9a0fea7c9e Upgrade Robo to v3.x 5462b82a22 Update composer.json 77d3575052 Fix missing default config values 1d4a0e7421 Consolidate global search settings e75e0f4add Remove duplicate "Global Search" link in the adminpanel 1bfa51fa73 Implement search engine selection d5a33281e1 Deprecate UnifiedSearchAdvanced fcce848d4c Unify search engines c8c02c5398 Remove new/legacy search engine labels e34cad759d Add codeception 4.1.x dependencies to composer cc3a504997 Migrate PHPUnit schema for 9.5.x ce5a63be20 Upgrade PHPUnit to 9.5.x f52dc24e61 Remove codeception 420303758e Fix tests remove incompletes c93e654768 Fix tests deprecated asserts 4feebbab22 Fix tests define return type hints abd327d267 Update test namespaces for PSR-4/PSR-8 f464e2a829 Fix tests redundant noinspection 5b74cc4d2c Fix tests misordered assert arguments 03a83246f4 Fix tests use appropriate asserts a04c048c18 Fix tests one-time use variables 683533e2b6 Fix tests method invocations 7e44ec9583 Update PHPUnit schema 2181ad7f3d Update Travis config to remove PHP 7.2 480a87c03a Update minimum required PHP to v7.3.0 200c6deb61 Update composer.lock git-subtree-dir: public/legacy git-subtree-split: 2aaee3c5581c025abca1114276e2d20c709f2812
2021-07-29 16:52:11 +01:00
public function isGroupedByModule(): bool
{
return $this->groupedByModule;
}
}