[Vtigercrm-commits] [vtiger development] #7781: Found a bug in the function userCurrencyId (vtiger 6 beta)
    vtiger development 
    vtiger-tickets at trac.vtiger.com
       
    Mon Oct 14 11:21:01 GMT 2013
    
    
  
#7781: Found a bug in the function userCurrencyId (vtiger 6 beta)
-----------------------+------------------------
 Reporter:  vikas      |      Owner:  vikas
     Type:  defect     |     Status:  new
 Priority:  minor      |  Milestone:  Unassigned
Component:  vtigercrm  |    Version:  6.0.0 Beta
 Severity:  Medium     |   Keywords:
-----------------------+------------------------
 currencies are not geting cached based on the user ids, as we are missing
 to fetch the userid from the database.
 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];
 }
 }}}
--
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/7781>
vtiger development <http://trac.vtiger.com/>
vtiger CRM
    
    
More information about the vtigercrm-commits
mailing list