[Vtigercrm-developers] Hotfix 2 Bug

Rubén A. Estrada Orozco rulotec1 at gmail.com
Fri Oct 16 15:48:09 GMT 2020


Hi,

I think the previous solution was better. It was good to have
max_scheduled_workflows in config.inc.php.

in getMaxAllowedScheduledWorkflows() having something like:

if (empty(max_scheduled_workflows)) {
   return 10;
}
return max_scheduled_workflows;


would have fixed the issue.

As Alan mentioned, there are already variables that are editable in
config.inc.php through "Settings->Configuration Editor". Why not use that
mechanism that already exists?

>> Let's introduce the api setMaxAllowedScheduledWorkflows() api.
Where should we then call the function? in config.inc.php?
It feels like we are overcomplicating the whole thing :(

Saludos

Rubén


On Fri, Oct 16, 2020 at 9:12 AM Martin Allen <martin.allen at clystnet.com>
wrote:

> Would it be a good idea to start using a package like this that handles
> environment variables - something like https://github.com/vlucas/phpdotenv
> which is used in many other PHP frameworks (Laravel etc).
>
> Martin Allen
>
>
> *01392 248692 - Main Office01392 690659 - Direct Line*
>
> *[image: signature2]*
>
> Have you visited our website recently? https://www.clystnet.com
> <http://www.clystnet.com/>
>
>
> The information in this email is confidential If you are not the intended
> recipient, you must not read or use that information. This email and any
> attachments are believed to be virus free however no responsibility is
> accepted by Clystnet for any loss or damage arising in any way from receipt
> or use thereof. Clystnet Ltd (company reg number 7164503) is based at
> Silverdown Park, Fair Oak Close, Clyst Honiton, EX5 2UX
>
>
> On Fri, 16 Oct 2020 at 12:37, Uma S <uma.s at vtiger.com> wrote:
>
>> Hi Martin,
>>
>> vglobals works with $GLOBALS of php.
>>
>> >>Are you aiming to remove these variables from config.inc.php
>> completely?
>> I think we should not alter config.inc.php. For now '
>> max_scheduled_workflows'
>>
>> >>In that case I have to ask the question: how are they supposed to be
>> changed?
>> To set the values of vglobal, you need to pass a key value pair.
>> i.e., vglobal(key, value).
>>
>> Let's introduce the api setMaxAllowedScheduledWorkflows() api.
>>
>> On Fri, Oct 16, 2020 at 2:54 PM Martin Allen <martin.allen at clystnet.com>
>> wrote:
>>
>>> Thanks Uma,
>>>
>>> I agree that taking a look at how the vglobal function works is a good
>>> idea.
>>>
>>> To me it makes sense that variables like this ARE set in the
>>> config.inc.php, and function like vglobal is used to retrieve these
>>> variables (and if they are not set, then use a default value). Is this what
>>> your intention is, or are you aiming to remove these variables from
>>> config.inc.php completely?
>>> In that case have to ask the question how are they supposed to be
>>> changed? (I thought the intention of the original bug was to have
>>> environment variables like this in a single unified location e.g.
>>> config.inc.php)
>>>
>>> Martin Allen
>>>
>>>
>>> *01392 248692 - Main Office01392 690659 - Direct Line*
>>>
>>> *[image: signature2]*
>>>
>>> Have you visited our website recently? https://www.clystnet.com
>>> <http://www.clystnet.com/>
>>>
>>>
>>> The information in this email is confidential If you are not the
>>> intended recipient, you must not read or use that information. This email
>>> and any attachments are believed to be virus free however no responsibility
>>> is accepted by Clystnet for any loss or damage arising in any way from
>>> receipt or use thereof. Clystnet Ltd (company reg number 7164503) is based
>>> at Silverdown Park, Fair Oak Close, Clyst Honiton, EX5 2UX
>>>
>>>
>>> On Fri, 16 Oct 2020 at 09:42, Uma S <uma.s at vtiger.com> wrote:
>>>
>>>> >>Err, the Settings->Configuration Editor alters config.inc.php...
>>>> Let's figure out a way to overcome this.
>>>>
>>>> >>Please do have an option to write the data in config.inc.php.
>>>> Typo! Please don't have an option to write the data in config.inc.php.
>>>>
>>>> On Fri, Oct 16, 2020 at 1:59 PM Alan Lord <alanslists at gmail.com> wrote:
>>>>
>>>>> On 16/10/2020 09:22, Uma S wrote:
>>>>> > Hi Martin,
>>>>> >
>>>>> > Sorry! I think maybe I am not clear on the point.
>>>>> >
>>>>> > As it's empathize not a good practice to alter config.inc.php, We
>>>>> have
>>>>> > removed that from config.template.php. Which you can see in our
>>>>> commit
>>>>>
>>>>> Err, the Settings->Configuration Editor alters config.inc.php...
>>>>>
>>>>> Al
>>>>> _______________________________________________
>>>>> http://www.vtiger.com/
>>>>>
>>>>
>>>>
>>>> --
>>>> With
>>>> Best Regards
>>>> Uma.S
>>>> Vtiger Team
>>>> _______________________________________________
>>>> http://www.vtiger.com/
>>>
>>> _______________________________________________
>>> http://www.vtiger.com/
>>
>>
>>
>> --
>> With
>> Best Regards
>> Uma.S
>> Vtiger Team
>> _______________________________________________
>> http://www.vtiger.com/
>
> _______________________________________________
> http://www.vtiger.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20201016/f6f33568/attachment.html>


More information about the vtigercrm-developers mailing list