Commit adcbc9b9 authored by Dries's avatar Dries
Browse files

- Patch #40524 by drumm: made sure that visiting the admin/modules page does...

- Patch #40524 by drumm: made sure that visiting the admin/modules page does not break your setup if you haven't run udpate.php yet.
parent e70cb8b5
......@@ -891,8 +891,13 @@ function system_modules() {
}
// Update the contents of the system table:
db_query("DELETE FROM {system} WHERE name = '%s' AND type = '%s'", $file->name, 'module');
db_query("INSERT INTO {system} (name, description, type, filename, status, throttle, bootstrap, schema_version) VALUES ('%s', '%s', '%s', '%s', %d, %d, %d, %d)", $file->name, $file->description, 'module', $file->filename, $file->status, $file->throttle, $bootstrap, $file->schema_version);
if (isset($file->status)) {
db_query("UPDATE {system} SET description = '%s', filename = '%s', bootstrap = %d WHERE name = '%s'", $file->description, $file->filename, $bootstrap, $file->name);
}
else {
// This is a new module.
db_query("INSERT INTO {system} (name, description, type, filename, status, throttle, bootstrap) VALUES ('%s', '%s', '%s', '%s', %d, %d, %d)", $file->name, $file->description, 'module', $file->filename, $file->status, $file->throttle, $bootstrap);
}
}
......
......@@ -891,8 +891,13 @@ function system_modules() {
}
// Update the contents of the system table:
db_query("DELETE FROM {system} WHERE name = '%s' AND type = '%s'", $file->name, 'module');
db_query("INSERT INTO {system} (name, description, type, filename, status, throttle, bootstrap, schema_version) VALUES ('%s', '%s', '%s', '%s', %d, %d, %d, %d)", $file->name, $file->description, 'module', $file->filename, $file->status, $file->throttle, $bootstrap, $file->schema_version);
if (isset($file->status)) {
db_query("UPDATE {system} SET description = '%s', filename = '%s', bootstrap = %d WHERE name = '%s'", $file->description, $file->filename, $bootstrap, $file->name);
}
else {
// This is a new module.
db_query("INSERT INTO {system} (name, description, type, filename, status, throttle, bootstrap) VALUES ('%s', '%s', '%s', '%s', %d, %d, %d)", $file->name, $file->description, 'module', $file->filename, $file->status, $file->throttle, $bootstrap);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment