Changeset 11449

Show
Ignore:
Timestamp:
02/18/11 16:04:35 (2 years ago)
Author:
p_lindheimer
Message:

remove legacy functions which create crashes during upgrade

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/2.9/amp_conf/htdocs/admin/libraries/freepbx_conf.class.php

    r11363 r11449  
    10221022  } 
    10231023} 
    1024  
    1025  
    1026 /** 
    1027  * These functions are LEFT OVER Legacy functions very minimally used and should probably be 
    1028  * removed and the offending usage eliminated. 
    1029  */ 
    1030  
    1031 /** Replaces variables in a string with the values from ampconf 
    1032  * eg, "%AMPWEBROOT%/admin" => "/var/www/html/admin" 
    1033  */ 
    1034 function ampconf_string_replace($string) { 
    1035   $freepbx_conf =& freepbx_conf::create(); 
    1036    
    1037   $target = array(); 
    1038   $replace = array(); 
    1039    
    1040   foreach ($freepbx_conf->conf as $key=>$value) { 
    1041     $target[] = '%'.$key.'%'; 
    1042     $replace[] = $value; 
    1043   } 
    1044    
    1045   return str_replace($target, $replace, $string); 
    1046 } 
    1047  
    1048 /** Expands variables from amportal.conf  
    1049  * Replaces any variables enclosed in percent (%) signs with their value 
    1050  * eg, "%AMPWEBROOT%/admin/functions.inc.php" 
    1051  */ 
    1052 //TODO: seems this the exact same as the above function. Should either be removed? 
    1053 function expand_variables($string) { 
    1054   return ampconf_string_replace($string); 
    1055 } 
    10561024?> 
  • freepbx/branches/2.9/amp_conf/htdocs/admin/libraries/module.functions.php

    r11104 r11449  
    509509          case 'file': // file exists 
    510510            // replace embedded amp_conf %VARIABLES% in string 
    511             $file = ampconf_string_replace($value); 
     511 
     512 
     513 
     514 
     515 
     516            $file = _module_ampconf_string_replace($value); 
    512517             
    513518            if (!file_exists( $file )) { 
     
    15281533} 
    15291534 
     1535/** Replaces variables in a string with the values from ampconf 
     1536 * eg, "%AMPWEBROOT%/admin" => "/var/www/html/admin" 
     1537 */ 
     1538function _module_ampconf_string_replace($string) { 
     1539  $freepbx_conf =& freepbx_conf::create(); 
     1540   
     1541  $target = array(); 
     1542  $replace = array(); 
     1543   
     1544  foreach ($freepbx_conf->conf as $key=>$value) { 
     1545    $target[] = '%'.$key.'%'; 
     1546    $replace[] = $value; 
     1547  } 
     1548   
     1549  return str_replace($target, $replace, $string); 
     1550} 
    15301551?>