You are here

protected static function InPlaceUpdate::stripFileDirectoryPath in Automatic Updates 7

Remove the files directory path from files from the archive.

Parameters

string $file: The file path.

Return value

bool TRUE if path was removed, else FALSE.

2 calls to InPlaceUpdate::stripFileDirectoryPath()
InPlaceUpdate::backup in ./InPlaceUpdate.php
Backup before an update.
InPlaceUpdate::checkModifiedFiles in ./InPlaceUpdate.php
Check if files are modified before applying updates.

File

./InPlaceUpdate.php, line 304

Class

InPlaceUpdate
Class to apply in-place updates.

Code

protected static function stripFileDirectoryPath(&$file) {
  if (strpos($file, self::ARCHIVE_DIRECTORY) === 0) {
    $file = substr($file, 6);
    return TRUE;
  }
  return FALSE;
}