Changeset 6769

Show
Ignore:
Timestamp:
09/18/08 01:15:04 (5 years ago)
Author:
p_lindheimer
Message:

add 2.5.0 upgrade directory and remove the moved files re #3209

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/2.5/upgrades/2.5.0/removefiles.php

    r5136 r6769  
    33global $amp_conf; 
    44 
    5 $htdocs = $amp_conf['AMPWEBROOT']."/admin/modules/framework/htdocs"; 
    6 $bin = $amp_conf['AMPWEBROOT']."/admin/modules/framework/bin"; 
    7  
    8 // Include the file that will end up in framework also so it doesn't get 
    9 // copied back 
    10 // 
    115$outdated = array( 
    12   $amp_conf['AMPWEBROOT']."/recordings/modules/help.module", 
    13   "$htdocs/recordings/modules/help.module", 
    14   $amp_conf['AMPWEBROOT']."/admin/bounce_op.sh", 
    15   "$htdocs/admin/bounce_op.sh", 
    16   $amp_conf['AMPWEBROOT']."/admin/logout.php", 
    17   "$htdocs/admin/logout.php", 
    18   $amp_conf['AMPWEBROOT']."/admin/footer.php", 
    19   "$htdocs/admin/footer.php", 
    20   $amp_conf['AMPWEBROOT']."/admin/images/background-grid.png", 
    21   "$htdocs/admin/images/background-grid.png", 
    22   $amp_conf['AMPWEBROOT']."/admin/images/background-triangle.png", 
    23   "$htdocs/admin/images/background-triangle.png", 
    24   $amp_conf['AMPWEBROOT']."/admin/common/jquery.js", 
    25   "$htdocs/admin/common/jquery.js", 
    26   $amp_conf['AMPWEBROOT']."/admin/common/jquery.tabs.js", 
    27   "$htdocs/admin/common/jquery.tabs.js", 
    28   $amp_conf['AMPWEBROOT']."/admin/common/freepbx.css", 
    29   "$htdocs/admin/common/freepbx.css", 
    30   $amp_conf['AMPWEBROOT']."/admin/common/jquery.interface.js", 
    31   "$htdocs/admin/common/jquery.interface.js", 
    32   $amp_conf['AMPWEBROOT']."/admin/common/jquery.tabs.css", 
    33   "$htdocs/admin/common/jquery.tabs.css", 
    34   $amp_conf['AMPBIN']."/retrieve_queues_conf_from_mysql.pl", 
    35   "$bin/retrieve_queues_conf_from_mysql.pl", 
    36   $amp_conf['AMPBIN']."/retrieve_zap_conf_from_mysql.pl", 
    37   "$bin/retrieve_zap_conf_from_mysql.pl", 
    38   $amp_conf['AMPBIN']."/retrieve_sip_conf_from_mysql.pl", 
    39   "$bin/retrieve_sip_conf_from_mysql.pl", 
    40   $amp_conf['AMPBIN']."/retrieve_iax_conf_from_mysql.pl", 
    41   "$bin/retrieve_iax_conf_from_mysql.pl", 
     6  $amp_conf['AMPWEBROOT']."/admin/cdr/css", 
     7  $amp_conf['AMPWEBROOT']."/admin/cdr/encrypt.js", 
     8  $amp_conf['AMPWEBROOT']."/admin/cdr/graph_hourdetail.php", 
     9  $amp_conf['AMPWEBROOT']."/admin/cdr/graph_pie.php", 
     10  $amp_conf['AMPWEBROOT']."/admin/cdr/graph_stat.php", 
     11  $amp_conf['AMPWEBROOT']."/admin/cdr/graph_statbar.php", 
     12  $amp_conf['AMPWEBROOT']."/admin/cdr/images/print.css", 
    4213); 
    4314 
     
    4617foreach ($outdated as $file) { 
    4718  outn("Checking $file.."); 
    48   if (file_exists($file) && !is_link($file)) { 
    49     unlink($file) ? out("Removed") : out("Failed to Remove"); 
     19  if (!is_dir($file)) { 
     20    if (file_exists($file) && !is_link($file)) { 
     21      unlink($file) ? out(_("Removed")) : out(_("Failed to Remove")); 
     22    } else { 
     23      out(_("Not Required")); 
     24    } 
    5025  } else { 
    51     out("Not Required"); 
     26    exec("rm -rf $file",$outarr,$ret); 
     27    if ($ret == 0) { 
     28      out(_("Removed directory")); 
     29    } else { 
     30      out(_("Failed to Remove directory")); 
     31    } 
    5232  } 
    5333}