summaryrefslogtreecommitdiff
path: root/modules/system.module
diff options
context:
space:
mode:
authorKjartan Mannes <kjartan@2.no-reply.drupal.org>2002-11-08 15:12:41 +0000
committerKjartan Mannes <kjartan@2.no-reply.drupal.org>2002-11-08 15:12:41 +0000
commitbacfc30b11c53457bc4fa35e0eda090d5e458420 (patch)
treeef79cc8081da7a4de3376cab2670ec9bd37708da /modules/system.module
parent756639bc4b4e3bc0ff912ae7c1adad91c4c81878 (diff)
downloadbrdo-bacfc30b11c53457bc4fa35e0eda090d5e458420.tar.gz
brdo-bacfc30b11c53457bc4fa35e0eda090d5e458420.tar.bz2
- Settings will no longer be lost of including a file fails.
Diffstat (limited to 'modules/system.module')
-rw-r--r--modules/system.module5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/system.module b/modules/system.module
index 5977d308e..312f1f577 100644
--- a/modules/system.module
+++ b/modules/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>";