Changeset 7874

Show
Ignore:
Timestamp:
06/28/09 11:04:24 (3 years ago)
Author:
p_lindheimer
Message:

fixes #3739 add new inbound route direct from URL resulting in proper page loaded

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.6/core/page.did.php

    r7731 r7874  
    143143?> 
    144144<?php  
    145    if ($extdisplay) {  
    146    //create variables for the selected route's settings 
    147    $extarray=explode('/',$extdisplay,2); 
    148    $ininfo=core_did_get($extarray[0],$extarray[1]); 
    149    if (is_array($ininfo)) { 
    150      extract($ininfo); 
    151     } 
     145    if ($extdisplay) {   
     146      //create variables for the selected route's settings 
     147      $extarray=explode('/',$extdisplay,2); 
     148      $ininfo=core_did_get($extarray[0],$extarray[1]); 
     149      if (is_array($ininfo) && !empty($ininfo)) { 
     150        extract($ininfo); 
     151        $delete_url = true; 
    152152?> 
    153153    <h2><?php echo _("Route")?>: <?php echo !empty($description)?$description:$extdisplay; ?></h2> 
    154154<?php 
    155     $delURL = $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING']."&action=delIncoming&didfilter=$didfilter&rnavsort=$rnavsort"; 
    156     $tlabel = sprintf(_("Delete Route %s"),!empty($description)?$description:$extdisplay); 
    157     $label = '<span><img width="16" height="16" border="0" title="'.$tlabel.'" alt="" src="images/core_delete.png"/>&nbsp;'.$tlabel.'</span>'; 
    158     echo "<p><a href=".$delURL.">".$label."</a></p>"; 
     155      } else { 
     156        $extension = $extarray[0]; 
     157        $cidnum    = $extarray[1]; 
     158        $delete_url = false; 
     159        $extdisplay = ''; 
     160?> 
     161    <h2><?php echo _("Add Incoming Route")?></h2> 
     162<?php 
     163      } 
     164 
     165    if ($delete_url) { 
     166      $delURL = $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING']."&action=delIncoming&didfilter=$didfilter&rnavsort=$rnavsort"; 
     167      $tlabel = sprintf(_("Delete Route %s"),!empty($description)?$description:$extdisplay); 
     168      $label = '<span><img width="16" height="16" border="0" title="'.$tlabel.'" alt="" src="images/core_delete.png"/>&nbsp;'.$tlabel.'</span>'; 
     169      echo "<p><a href=".$delURL.">".$label."</a></p>"; 
     170    } 
    159171    // If this is a direct did, e.g. from-did-direct,nnn,1 then make a link to the extension 
    160172    // 
     
    176188?> 
    177189<?php  
    178   } else {  
    179 ?> 
    180      <h2><?php echo _("Add Incoming Route")?></h2> 
     190  } else { 
     191?> 
     192    <h2><?php echo _("Add Incoming Route")?></h2> 
    181193<?php  
    182194  }