Index: install.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/docs/developer/hooks/install.php,v
retrieving revision 1.1
diff -u -F^f -r1.1 install.php
--- install.php	15 Feb 2006 20:41:18 -0000	1.1
+++ install.php	21 Feb 2006 15:13:38 -0000
@@ -17,14 +17,19 @@
 /**
  * Install the current version of the database schema.
  *
- * The hook will be called the first time a module is installed. The module's
+ * The hook will be called the first time a module is installed, and the module's
  * schema version will be set to the module's greatest numbered update hook.
- * Because of this, anytime a hook_update_N() is added, this function need to
- * be updated to install the current version of the schema.
+ * Because of this, anytime a hook_update_N() is added to the module, this function
+ * needs to be updated to reflect the current version of the database schema.
  *
  * Table names in the CREATE queries should be wrapped with curly braces
  * so that they're prefixed correctly, see db_prefix_tables() for more on this.
  *
+ * Note that since this function is called from a full bootstrap, all functions
+ * (including those in modules enabled by the current page request) are available when
+ * this hook is called. Use cases could be displaying a user message, or calling a module
+ * function necessary for initial setup, etc.
+ *
  * Implementations of this hook should be placed in a mymodule.install file in
  * the same directory at mymodule.module.
  */
@@ -32,31 +37,24 @@ function hook_install() {
   switch ($GLOBALS['db_type']) {
     case 'mysql':
     case 'mysqli':
-      db_query(
-<<<MYSQL
-CREATE TABLE {event} (
-  nid int(10) unsigned NOT NULL default '0',
-  event_start int(10) unsigned NOT NULL default '0',
-  event_end int(10) unsigned NOT NULL default '0',
-  timezone int(10) NOT NULL default '0',
-  PRIMARY KEY (nid),
-  KEY event_start (event_start)
-) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;
-MYSQL
+      db_query("CREATE TABLE {event} (
+                  nid int(10) unsigned NOT NULL default '0',
+                  event_start int(10) unsigned NOT NULL default '0',
+                  event_end int(10) unsigned NOT NULL default '0',
+                  timezone int(10) NOT NULL default '0',
+                  PRIMARY KEY (nid),
+                  KEY event_start (event_start)
+                ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;"
       );
       break;
 
     case 'pgsql':
-      db_query(
-<<<PGSQL
-CREATE TABLE {event} (
-  nid int NOT NULL default '0',
-  event_start int NOT NULL default '0',
-  event_end int NOT NULL default '0',
-  timezone int NOT NULL default '0',
-  PRIMARY KEY (nid)
-);
-PGSQL
+      db_query("CREATE TABLE {event} (
+                  nid int NOT NULL default '0',
+                  event_start int NOT NULL default '0',
+                  event_end int NOT NULL default '0',
+                  timezone int NOT NULL default '0',
+                  PRIMARY KEY (nid));"
       );
       break;
   }
