Changeset 13093

Show
Ignore:
Timestamp:
12/17/11 16:41:54 (1 year ago)
Author:
p_lindheimer
Message:

remove packaged files re #5480, needs testing!

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.10/fw_langpacks/install.php

    r13091 r13093  
    55 
    66function fw_langpacks_print_errors($src, $dst, $errors) { 
    7   echo "error copying fw_langpacks files:<br />'cp -rf' from src: '$src' to dst: '$dst'...details follow<br />"; 
     7  out("error copying files:"); 
     8  out(sprintf(_("'cp -rf' from src: '%s' to dst: '%s'...details follow"), $src, $dst)); 
     9  freepbx_log(FPBX_LOG_ERROR, sprintf(_("fw_langpacks couldn't copy file to %s"),$dst)); 
    810  foreach ($errors as $error) { 
    9     echo "$error<br />"; 
     11    out("$error"); 
     12    freepbx_log(FPBX_LOG_ERROR, _("cp error output: $error")); 
    1013  } 
    1114} 
     
    8184    } 
    8285  } 
     86 
     87  // We now delete the files, this makes sure that if someone had an unprotected system where they have not enabled 
     88  // the .htaccess files or otherwise allowed direct access, that these files are not around to possibly cause problems 
     89  // 
     90  out(_("fw_langpacks file install done, removing packages from module")); 
     91  unset($out); 
     92  exec("rm -rf $htdocs_source 2>&1",$out,$ret); 
     93  if ($ret != 0) { 
     94    out(_("an error occured removing the packaged files")); 
     95  } else { 
     96    out(_("files removed successfully")); 
     97  } 
    8398?>