You are here

public function elFinderVolumeDrupal::extract in elFinder file manager 7.3

Same name and namespace in other branches
  1. 8.2 src/Controller/elFinderVolumeDrupal.php \elFinderVolumeDrupal::extract()
  2. 6.2 inc/elfinder.drupalfs.driver.inc \elFinderVolumeDrupal::extract()
  3. 7.2 inc/elfinder.drupalfs.driver.inc \elFinderVolumeDrupal::extract()

Extract files from archive.

Run the parent extract() then add the files to the Drupal db.

Parameters

string $hash: Archive filename hash.

bool $makedir: Extract the files into a new folder.

Return value

array|bool

File

inc/elfinder.drupalfs.driver.inc, line 447
elFinder driver for Drupal filesystem.

Class

elFinderVolumeDrupal
@file

Code

public function extract($hash, $makedir = NULL) {
  if (!$this
    ->CheckUserQuota()) {
    return FALSE;
  }
  $path = parent::extract($hash, $makedir);

  // If 'extract to new folder' was chosen, rearrange the array.
  if (!empty($path['mime'])) {
    $path = array(
      0 => $path,
    );
  }
  $this
    ->AddToDrupalDB($path);
  return $path;
}