You are here

function acquia_spi_check_files_present in Acquia Connector 7.3

Same name and namespace in other branches
  1. 6.2 acquia_spi/acquia_spi.module \acquia_spi_check_files_present()
  2. 7.2 acquia_spi/acquia_spi.module \acquia_spi_check_files_present()

Check to see if the unneeded release files with Drupal are removed.

Return value

bool True if they are removed, false if they aren't

1 call to acquia_spi_check_files_present()
acquia_spi_get in acquia_spi/acquia_spi.module
Gather site profile information about this site.

File

acquia_spi/acquia_spi.module, line 1147
Send site profile information (NSPI) and system data to Acquia Insight.

Code

function acquia_spi_check_files_present() {
  $server = $_SERVER;
  $files_exist = FALSE;
  $files_to_remove = array(
    'CHANGELOG.txt',
    'COPYRIGHT.txt',
    'INSTALL.mysql.txt',
    'INSTALL.pgsql.txt',
    'INSTALL.txt',
    'LICENSE.txt',
    'MAINTAINERS.txt',
    'README.txt',
    'UPGRADE.txt',
    'PRESSFLOW.txt',
    'install.php',
  );
  foreach ($files_to_remove as $file) {
    $path = $server['DOCUMENT_ROOT'] . base_path() . $file;
    if (file_exists($path)) {
      $files_exist = TRUE;
    }
  }
  return $files_exist ? 1 : 0;
}