[Vtigercrm-commits] [vtiger development] #7042: Phone numbers in ListView ignore PBXManager module status

vtiger development vtiger-tickets at trac.vtiger.com
Fri Mar 11 01:34:04 PST 2011


#7042: Phone numbers in ListView ignore PBXManager module status
----------------------------------------------------------+-----------------
 Reporter:  thom                                          |       Owner:  developer
     Type:  defect                                        |      Status:  new      
 Priority:  minor                                         |   Milestone:  5.2.1    
Component:  vtigercrm                                     |     Version:  5.2.1    
 Keywords:  listview,listviewcontroller,phone,pbxmanager  |  
----------------------------------------------------------+-----------------
 File: include\ListView\ListViewController.php

 Problem: When outputting a phone number field to a ListView, the ListView
 always wraps the phone number in a hyperlink with an
 onclick='startCall(...)' property. If the PBXManager module is disabled,
 or is not configured, clicking on this hyperlink causes an error to be
 displayed.

 To reproduce: create a new vtiger site with demo data. The PBXManager is
 by default enabled and not configured. Go to Settings>Modules and disable
 it. Go to any page that displays a ListView e.g. Leads. All the phone
 numbers are hyperlinked, even though PBXManager is not enabled. Click the
 hyperlink. An error is displayed.

 Expected results: If the PBXManager module is disabled, the phone numbers
 should not be hyperlinked.

 Resolution: Change the ListViewController.php file as follows:
 Between lines 385 and 386, insert a new line:
 if (vtlib_isModuleActive('PBXManager')) {

 After line 387 (which is now line 388), insert a new line:
 }

 The code should now look like:
 } elseif ($field->getFieldDataType() == 'phone') {
     if (vtlib_isModuleActive('PBXManager')) {
         $value = "<a href='javascript:;'
 onclick='startCall(&quot;$value&quot;, ".
             "&quot;$recordId&quot;)'>$value</a>";
 }

 This disables the hyperlink if PBXManager module is not active.

-- 
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/7042>
vtiger development <http://trac.vtiger.com/>
vtigerCRM



More information about the vtigercrm-commits mailing list