diff options
Diffstat (limited to 'modules/system/system.install')
-rw-r--r-- | modules/system/system.install | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/modules/system/system.install b/modules/system/system.install index 07300db70..415243faf 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -494,12 +494,13 @@ function system_install() { filename varchar(255) NOT NULL default '', name varchar(255) NOT NULL default '', type varchar(255) NOT NULL default '', - description varchar(255) NOT NULL default '', + owner varchar(255) NOT NULL default '', status int NOT NULL default '0', throttle tinyint DEFAULT '0' NOT NULL, bootstrap int NOT NULL default '0', schema_version smallint NOT NULL default -1, weight int NOT NULL default '0', + info text, PRIMARY KEY (filename), KEY (weight) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ "); @@ -967,12 +968,13 @@ function system_install() { filename varchar(255) NOT NULL default '', name varchar(255) NOT NULL default '', type varchar(255) NOT NULL default '', - description varchar(255) NOT NULL default '', + owner varchar(255) NOT NULL default '', status int NOT NULL default '0', throttle smallint DEFAULT '0' NOT NULL, bootstrap int NOT NULL default '0', schema_version smallint NOT NULL default -1, weight int NOT NULL default '0', + info text, PRIMARY KEY (filename) )"); db_query("CREATE INDEX {system}_weight_idx ON {system} (weight)"); @@ -1081,8 +1083,8 @@ function system_install() { break; } - db_query("INSERT INTO {system} (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('themes/engines/phptemplate/phptemplate.engine', 'phptemplate', 'theme_engine', '', 1, 0, 0, 0)"); - db_query("INSERT INTO {system} (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('themes/garland/page.tpl.php', 'garland', 'theme', 'themes/engines/phptemplate/phptemplate.engine', 1, 0, 0, 0)"); + db_query("INSERT INTO {system} (filename, name, type, owner, status, throttle, bootstrap, schema_version) VALUES ('themes/engines/phptemplate/phptemplate.engine', 'phptemplate', 'theme_engine', '', 1, 0, 0, 0)"); + db_query("INSERT INTO {system} (filename, name, type, owner, status, throttle, bootstrap, schema_version, info) VALUES ('themes/garland/page.tpl.php', 'garland', 'theme', 'themes/engines/phptemplate/phptemplate.engine', 1, 0, 0, 0, '%s')", serialize(drupal_parse_info_file('themes/garland/garland.info') + system_theme_default())); db_query("INSERT INTO {users} (uid,name,mail) VALUES(0,'','')"); @@ -3709,6 +3711,32 @@ function system_update_6007() { } /** + * Add info files to themes. + */ +function system_update_6008() { + $ret = array(); + + // Alter system table. + switch ($GLOBALS['db_type']) { + case 'pgsql': + db_add_column($ret, 'system', 'info', 'text'); + db_change_column($ret, 'system', 'description', 'owner', 'varchar(255)', array('not null' => TRUE, 'default' => "''")); + break; + case 'mysql': + case 'mysqli': + $ret[] = update_sql("ALTER TABLE {system} ADD info longtext"); + $ret[] = update_sql("ALTER TABLE {system} CHANGE description owner varchar(255) NOT NULL default ''"); + break; + } + + // Rebuild system table contents. + module_rebuild_cache(); + system_theme_data(); + + return $ret; +} + +/** * @} End of "defgroup updates-5.x-to-6.x" * The next series of updates should start at 7000. */ |