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

Vtiger development vtiger-tickets at trac.vtiger.com
Tue Aug 12 05:08:34 GMT 2014


#7042: Phone numbers in ListView ignore PBXManager module status
-------------------------------------------------+-------------------------
 Reporter:  thom                                 |       Owner:  developer
     Type:  defect                               |      Status:  closed
 Priority:  minor                                |   Milestone:  6.1.0
Component:  vtigercrm                            |     Version:  5.2.1
 Severity:  Medium                               |  Resolution:  fixed
 Keywords:                                       |
  listview,listviewcontroller,phone,pbxmanager   |
-------------------------------------------------+-------------------------
Changes (by prasad):

 * status:  new => closed
 * severity:   => Medium
 * resolution:   => fixed
 * milestone:  5.2.1 => 6.1.0


Old description:

> 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("$value", ".
>             ""$recordId")'>$value</a>";
> }
>
> This disables the hyperlink if PBXManager module is not active.

New description:

 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("$value", ".
             ""$recordId")'>$value</a>";
 }

 This disables the hyperlink if PBXManager module is not active.

--

Comment:

 This has been taken care in 6.1.0.

--
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/7042#comment:1>
Vtiger development <http://trac.vtiger.com/>
Vtiger CRM


More information about the vtigercrm-commits mailing list