summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/system.install29
-rw-r--r--modules/system/system.module2
2 files changed, 30 insertions, 1 deletions
diff --git a/modules/system/system.install b/modules/system/system.install
index dbd6c8f29..f84bc570c 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -1092,8 +1092,31 @@ function system_schema() {
'length' => 255,
'not null' => TRUE,
),
+ 'module' => array(
+ 'description' => t('Name of the module the file belongs to.'),
+ 'type' => 'varchar',
+ 'length' => 255,
+ 'not null' => TRUE,
+ 'default' => ''
+ ),
+ 'suffix' => array(
+ 'description' => t("The part of the function name after the module, which is the hook this function implements, if any."),
+ 'type' => 'varchar',
+ 'length' => 68,
+ 'not null' => TRUE,
+ 'default' => ''
+ ),
+ 'weight' => array(
+ 'description' => t("The order in which this module's hooks should be invoked relative to other modules. Equal-weighted modules are ordered by name."),
+ 'type' => 'int',
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
),
'primary key' => array('name', 'type'),
+ 'indexes' => array(
+ 'hook' => array('type', 'suffix', 'weight', 'module'),
+ ),
);
$schema['registry_file'] = array(
@@ -2931,8 +2954,14 @@ function system_update_7006() {
'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
'type' => array('type' => 'varchar', 'length' => 9, 'not null' => TRUE, 'default' => ''),
'filename' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+ 'module' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+ 'suffix' => array('type' => 'varchar', 'length' => 69, 'not null' => TRUE, 'default' => ''),
+ 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
),
'primary key' => array('name', 'type'),
+ 'indexes' => array(
+ 'hook' => array('type', 'suffix', 'weight', 'module'),
+ ),
);
$schema['registry_file'] = array(
'fields' => array(
diff --git a/modules/system/system.module b/modules/system/system.module
index c448a9143..48ac89a63 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -935,7 +935,7 @@ function system_check_directory($form_element) {
*/
function system_get_files_database(&$files, $type) {
// Extract current files from database.
- $result = db_query("SELECT filename, name, type, status, schema_version FROM {system} WHERE type = '%s'", $type);
+ $result = db_query("SELECT filename, name, type, status, schema_version, weight FROM {system} WHERE type = '%s'", $type);
while ($file = db_fetch_object($result)) {
if (isset($files[$file->name]) && is_object($files[$file->name])) {
$file->old_filename = $file->filename;