summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2008-11-09 05:50:48 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2008-11-09 05:50:48 +0000
commit0aeda0f143a2f35333ee31f0fa6058fd13e45305 (patch)
tree374972ca1f45a2b37b441bd692e0275ff7f0c157
parent8f8cdb619727a2b3a511630e72522b88a3f24747 (diff)
downloadbrdo-0aeda0f143a2f35333ee31f0fa6058fd13e45305.tar.gz
brdo-0aeda0f143a2f35333ee31f0fa6058fd13e45305.tar.bz2
Roll-back of #304936; broke because #74645 patch was rolled back.
-rw-r--r--modules/simpletest/simpletest.install21
1 files changed, 4 insertions, 17 deletions
diff --git a/modules/simpletest/simpletest.install b/modules/simpletest/simpletest.install
index bb59d47df..a1ceeb974 100644
--- a/modules/simpletest/simpletest.install
+++ b/modules/simpletest/simpletest.install
@@ -28,14 +28,12 @@ function simpletest_install() {
}
// Copy other test files for consistency.
- $original = drupal_get_path('module', 'simpletest') . '/files';
- $files = file_scan_directory($original, '(html|image|javascript|php|sql)-.*');
-
- // If there are more files in the original directory than the files directory, copy files.
- if (count($files) > count(file_scan_directory($path, '(html|image|javascript|php|sql)-.*'))) {
+ $files = file_scan_directory($path, '/(html|image|javascript|php|sql)-.*/');
+ if (count($files) == 0) {
+ $original = drupal_get_path('module', 'simpletest') . '/files';
$files = file_scan_directory($original, '/(html|image|javascript|php|sql)-.*/');
foreach ($files as $file) {
- file_copy($file->filename, $path, FILE_EXISTS_REPLACE);
+ file_unmanaged_copy($file->filename, $path . '/' . $file->basename);
}
$generated = TRUE;
}
@@ -94,22 +92,11 @@ function simpletest_get_file_count($directory, $filename) {
* Implementation of hook_uninstall().
*/
function simpletest_uninstall() {
- // Remove settings variables.
variable_del('simpletest_httpauth');
variable_del('simpletest_httpauth_username');
variable_del('simpletest_httpauth_pass');
variable_del('simpletest_devel');
-
- // Uninstall schema.
drupal_uninstall_schema('simpletest');
-
- // Remove generated files.
- $path = file_directory_path() . '/simpletest';
- $files = file_scan_directory($path, '.*');
- foreach ($files as $file) {
- file_delete($file->filename);
- }
- rmdir($path);
}
/**