summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-02-01 07:17:59 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-02-01 07:17:59 +0000
commit10fd10cf455bf21f7799c6c9b245808f5262733a (patch)
tree98eb0c73bb9f11625e18ec04cccdcf6fceed5da6
parentb9a3a7bfc1495fea6a00a418ca0e50fa9fc939f2 (diff)
downloadbrdo-10fd10cf455bf21f7799c6c9b245808f5262733a.tar.gz
brdo-10fd10cf455bf21f7799c6c9b245808f5262733a.tar.bz2
#700686 by dww: Make ArchiverInterface::listContents() return a simple list of files, rather than a keyed array, which is inconsistent between extension handlers.
-rw-r--r--includes/archiver.inc3
-rw-r--r--modules/system/system.archiver.inc6
-rw-r--r--modules/update/update.manager.inc2
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);