You are here

function _auditfiles_not_in_database_fix_path_separators in Audit Files 7.3

Corrects the separators of a file system's file path.

Changes the separators of a file path, so they are match the ones being used on the operating system the site is running on.

Parameters

string $path: The path to correct.

Return value

string The corrected path.

2 calls to _auditfiles_not_in_database_fix_path_separators()
_auditfiles_not_in_database_batch_display_get_files in ./auditfiles.notindatabase.inc
Recurse directories and add files to an array.
_auditfiles_not_in_database_get_files_for_report in ./auditfiles.notindatabase.inc
Updates a list of files with files found in the specified path.

File

./auditfiles.notindatabase.inc, line 915
Generates a report showing files on the server, but not in the database.

Code

function _auditfiles_not_in_database_fix_path_separators($path) {
  $path = preg_replace('@\\/\\/@', DIRECTORY_SEPARATOR, $path);
  $path = preg_replace('@\\\\@', DIRECTORY_SEPARATOR, $path);
  return $path;
}