From 10fd10cf455bf21f7799c6c9b245808f5262733a Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Mon, 1 Feb 2010 07:17:59 +0000 Subject: #700686 by dww: Make ArchiverInterface::listContents() return a simple list of files, rather than a keyed array, which is inconsistent between extension handlers. --- includes/archiver.inc | 3 +-- modules/system/system.archiver.inc | 6 +++++- modules/update/update.manager.inc | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/includes/archiver.inc b/includes/archiver.inc index 37d221ef2..5e6ef323f 100644 --- a/includes/archiver.inc +++ b/includes/archiver.inc @@ -60,8 +60,7 @@ interface ArchiverInterface { * 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(); } diff --git a/modules/system/system.archiver.inc b/modules/system/system.archiver.inc index 557a27d80..c6880e170 100644 --- a/modules/system/system.archiver.inc +++ b/modules/system/system.archiver.inc @@ -49,7 +49,11 @@ class ArchiverTar implements ArchiverInterface { } public function listContents() { - return $this->tar->listContent(); + $files = array(); + foreach ($this->tar->listContent() as $file_data) { + $files[] = $file_data['filename']; + } + return $files; } /** diff --git a/modules/update/update.manager.inc b/modules/update/update.manager.inc index 3425ae247..0c63d3e6a 100644 --- a/modules/update/update.manager.inc +++ b/modules/update/update.manager.inc @@ -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); -- cgit v1.2.3