Commit 10fd10cf authored by webchick's avatar webchick

#700686 by dww: Make ArchiverInterface::listContents() return a simple list of...

#700686 by dww: Make ArchiverInterface::listContents() return a simple list of files, rather than a keyed array, which is inconsistent between extension handlers.
parent b9a3a7bf
......@@ -60,8 +60,7 @@ public function extract($path, Array $files = array());
* List all files in the archive.
*
* @return
* An array of file names relative to the root of the archive, or
* an iterable object that resolves to such a list.
* An array of file names relative to the root of the archive.
*/
public function listContents();
}
......
......@@ -49,7 +49,11 @@ public function extract($path, Array $files = array()) {
}
public function listContents() {
return $this->tar->listContent();
$files = array();
foreach ($this->tar->listContent() as $file_data) {
$files[] = $file_data['filename'];
}
return $files;
}
/**
......
......@@ -563,7 +563,7 @@ function update_manager_install_form_submit($form, &$form_state) {
return;
}
// Unfortunately, we can only use the directory name for this. :(
$project = drupal_substr($files[0]['filename'], 0, -1);
$project = drupal_substr($files[0], 0, -1);
try {
update_manager_archive_verify($project, $local_cache, $directory);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment