Hello.
Since my custom filter was triggering an error ("$in requires an array"), i created a new PHP file containing a "CustomFilterApi" class that extends FilterApi class, so then i was able to change some FilterApi's functions and bypass my filter's error. But when i extend the FilterApi class, it triggers some forbidden functions.
There's my CustomFilterApi code:
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
/*
* Your installation or use of this SugarCRM file is subject to the applicable
* terms available at
* http://support.sugarcrm.com/Resources/Master_Subscription_Agreements/.
* If you do not agree to all of the applicable terms or do not have the
* authority to bind the entity as an authorized representative, then do not
* install or use this SugarCRM file.
*
* Copyright (C) SugarCRM Inc. All rights reserved.
*/
require_once ("clients/base/api/FilterApi.php");
class CustomFilterApi extends FilterApi
{
protected static function addFilters(array $filterDefs, SugarQuery_Builder_Where $where, SugarQuery $q)
{
foreach ($filterDefs as $filterDef) {
if (!is_array($filterDef)) {
Error screenshot:
/resized-image/__size/319x137/__key/communityserver-discussions-components-files/42/EVIDENCE1.png