diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-12-06 06:50:08 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-12-06 06:50:08 +0000 |
commit | 0369f3f80874c5f61f29f4af400c36f879e21ec1 (patch) | |
tree | be3df28920e9487b5d8e393499968ef0c7593449 /modules/update/update.api.php | |
parent | aa71f4abe49348762d1a7cefe1a7b7eb53fbe96f (diff) | |
download | brdo-0369f3f80874c5f61f29f4af400c36f879e21ec1.tar.gz brdo-0369f3f80874c5f61f29f4af400c36f879e21ec1.tar.bz2 |
#936490 by dww, tstoeckler, haydeniv, Bojhan: Fixed Update module should verify downloaded tarballs and propagate errors correctly
Diffstat (limited to 'modules/update/update.api.php')
-rw-r--r-- | modules/update/update.api.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/update/update.api.php b/modules/update/update.api.php index b02b22300..ef78cbf42 100644 --- a/modules/update/update.api.php +++ b/modules/update/update.api.php @@ -115,16 +115,18 @@ function hook_update_status_alter(&$projects) { * The directory that the archive was extracted into. * * @return - * If there is a problem, return any non-null value. If there is no problem, - * don't return anything (null). + * If there are any problems, return an array of error messages. If there are + * no problems, return an empty array. * * @see update_manager_archive_verify() */ function hook_verify_update_archive($project, $archive_file, $directory) { + $errors = array(); if (!file_exists($directory)) { - return TRUE; + $errors[] = t('The %directory does not exist.', array('%directory' => $directory)); } // Add other checks on the archive integrity here. + return $errors; } /** |