[Vtigercrm-developers] vTiger 5 Alpha.

Josh Lee jlee at zertis.net
Fri Apr 14 14:21:20 PDT 2006


Bugfix.  There was a problem with uneven number of fields in detail view.
Simple probelm simple fix.

includes/utils/DetailViewUtils.php
At the bottom of the file change this:

    for ($i=0,$j=0;$i<count($label_data);$i=$i+2,$j++)
    {
        $keys=array_keys($label_data[$i]);
                $key1=$keys[0];
        if(is_array($label_data[$i+1]))
        {
                    $keys=array_keys($label_data[$i+1]);
                    $key2=$keys[0];
        }
        $return_data[$j]=array($key1 => $label_data[$i][$key1],$key2 => 
$label_data[$i+1][$key2]);
    }
    return $return_data;


To this:

    for ($i=0,$j=0;$i<count($label_data);$i=$i+2,$j++)
    {
       // jlee added two lines to fix bug
        $key1 = null;
        $key2 = null;
       // Done adding
        $keys=array_keys($label_data[$i]);
                $key1=$keys[0];
        if(is_array($label_data[$i+1]))
        {
                    $keys=array_keys($label_data[$i+1]);
                    $key2=$keys[0];
        }
        $return_data[$j]=array($key1 => $label_data[$i][$key1],$key2 => 
$label_data[$i+1][$key2]);
    }
    return $return_data;


Hope this helps!

-- 
Josh Lee
Software Engineer
Zertis Technologies, LLC
205.422.5279
jlee at zertis.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: jlee.vcf
Type: text/x-vcard
Size: 219 bytes
Desc: not available
Url : http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20060414/feaebd3a/attachment-0003.vcf 


More information about the vtigercrm-developers mailing list