[Vtigercrm-developers] Found a bug in the function userCurrencyId (vtiger 6 beta)
Vikas Jain
vikas at vtiger.com
Mon Oct 14 11:22:19 UTC 2013
Scott,
Thanks for identifying the bug, you can file bugs on trac.vtiger.com.
Here<http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/7781> is
the ticket created for this one.
If you need a login to create issues, please send an request to
info at vtiger.com.
On 13 October 2013 11:33, sww <scottearle at gmail.com> wrote:
> It's a simple bug, with a simple fix, I know ... but it has a pretty
> catastrophic effect when (for example) creating a new product.
>
> I searched in the list to see if anyone else had previously mentioned this
> function, but nobody seems to so far. I don't know if there is a bug
> tracker, so I thought it best to post here. Apologies if I just broke some
> super-strict rule.
>
> In vtlib/Vtiger/Functions.php, line 68:
>
> static function userCurrencyId($userid) {
> global $current_user, $adb;
>
> if (!isset(self::$userIdCurrencyIdCache[$userid])) {
> $result = $adb->pquery('SELECT currency_id FROM
> vtiger_users', array());
> while ($row = $adb->fetch_array($result)) {
> self::$userIdCurrencyIdCache[$row['id']] =
> $row['currency_id'];
> }
> }
> return self::$userIdCurrencyIdCache[$userid];
> }
>
> Should be:
>
> static function userCurrencyId($userid) {
> global $current_user, $adb;
>
> if (!isset(self::$userIdCurrencyIdCache[$userid])) {
> $result = $adb->pquery('SELECT id, currency_id FROM
> vtiger_users', array());
> while ($row = $adb->fetch_array($result)) {
> self::$userIdCurrencyIdCache[$row['id']] =
> $row['currency_id'];
> }
> }
> return self::$userIdCurrencyIdCache[$userid];
> }
>
> Best regards,
>
> Scott
>
>
>
> --
> View this message in context:
> http://vtiger-crm.2324883.n4.nabble.com/Found-a-bug-in-the-function-userCurrencyId-vtiger-6-beta-tp8477.html
> Sent from the vtigercrm-developers mailing list archive at Nabble.com.
> _______________________________________________
> http://www.vtiger.com/
>
--
Regards
Vikas
Vtiger Team
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20131014/f79cec0e/attachment.html>
More information about the vtigercrm-developers
mailing list