[Vtigercrm-commits] [vtiger development] #7409: CallRelatedList.php incorrect call to header function on singlepane_view

vtiger development vtiger-tickets at trac.vtiger.com
Tue May 8 12:41:03 PDT 2012


#7409: CallRelatedList.php incorrect call to header function on singlepane_view
------------------------+---------------------------------------------------
 Reporter:  joebordes   |       Owner:  developer
     Type:  defect      |      Status:  new      
 Priority:  unassigned  |   Milestone:  6.0.0    
Component:  vtigercrm   |     Version:  5.4.0    
 Severity:  Low         |    Keywords:           
------------------------+---------------------------------------------------
 In the rare case where CallRelatedList action is called when
 singlepane_view is set, there is a protection mechanism in the code to
 redirect to the correct view, but this code executes a header() call when
 output has already been sent to the browser.

 I propose changing the code to javascript redirect like this:

 {{{
 Index: vtlib/ModuleDir/5.4.0/CallRelatedList.php
 ===================================================================
 --- vtlib/ModuleDir/5.4.0/CallRelatedList.php   (revisión: 188)
 +++ vtlib/ModuleDir/5.4.0/CallRelatedList.php   (copia de trabajo)
 @@ -18,7 +18,8 @@
  $isduplicate = vtlib_purify($_REQUEST['isDuplicate']);

  if($singlepane_view == 'true' && $action == 'CallRelatedList') {
 -
 header("Location:index.php?action=DetailView&module=$currentModule&record=$record&parenttab=$category");
 +       echo
 "<script>document.location='index.php?action=DetailView&module=$currentModule&record=$record&parenttab=$category';</script>";
 +       die();
  } else {

         $tool_buttons = Button_Check($currentModule);
 }}}

 The above change works for me.

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



More information about the vtigercrm-commits mailing list