diff options
author | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2002-11-08 15:12:41 +0000 |
---|---|---|
committer | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2002-11-08 15:12:41 +0000 |
commit | bacfc30b11c53457bc4fa35e0eda090d5e458420 (patch) | |
tree | ef79cc8081da7a4de3376cab2670ec9bd37708da /modules/system/system.module | |
parent | 756639bc4b4e3bc0ff912ae7c1adad91c4c81878 (diff) | |
download | brdo-bacfc30b11c53457bc4fa35e0eda090d5e458420.tar.gz brdo-bacfc30b11c53457bc4fa35e0eda090d5e458420.tar.bz2 |
- Settings will no longer be lost of including a file fails.
Diffstat (limited to 'modules/system/system.module')
-rw-r--r-- | modules/system/system.module | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/system/system.module b/modules/system/system.module index 5977d308e..312f1f577 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -176,9 +176,6 @@ function system_listing($type, $directory, $required = array()) { ksort($files); - // Clean up database. - db_query("DELETE FROM system WHERE type = '%s'", $type); - $output = "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n"; $output .= "<tr><th>name</th><th>description</th><th>enabled</th></tr>\n"; @@ -200,6 +197,8 @@ function system_listing($type, $directory, $required = array()) { } } + // Clean up database. + db_query("DELETE FROM system WHERE filename = '%s' AND type = '%s'", $filename, $type); db_query("INSERT INTO system (name, description, type, filename, status) VALUES ('%s', '%s', '%s', '%s', %d)", $info->name, $info->description, $type, $filename, $file->status); $output .= "<tr>"; |