Index: flag.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/flag/flag.install,v
retrieving revision 1.2.2.32.2.10
diff -u -p -r1.2.2.32.2.10 flag.install
--- flag.install	8 May 2010 20:44:06 -0000	1.2.2.32.2.10
+++ flag.install	7 Oct 2010 17:06:32 -0000
@@ -39,44 +39,6 @@ function flag_uninstall() {
 }
 
 /**
- * Implementation of hook_enable().
- *
- * We create the demonstration flag on enable, so hook implementations in flag
- * module will fire correctly, as the APIs are not available on install.
- */
-function flag_enable() {
-  // Load the flag API in case we want to use it when enabling.
-  include_once(drupal_get_path('module', 'flag') .'/flag.module');
-
-  if (!flag_get_flags()) {
-    // Install a demonstration flag only if no flag exists. This is to prevent
-    // a case where a disables and enables the module, and the demonstration
-    // flag is overwritten or re-created.
-    $flag = flag_flag::factory_by_content_type('node');
-    $configuration = array(
-      'name' => 'bookmarks',
-      'global' => 0,
-      'show_on_page' => 1,
-      'show_on_teaser' => 1,
-      'show_on_form' => 1,
-      // The following UI labels aren't wrapped in t() because they are written
-      // to the DB in English. They are passed to t() later, thus allowing for
-      // multilingual sites.
-      'title' => 'Bookmarks',
-      'flag_short' => 'Bookmark this',
-      'flag_long' => 'Add this post to your bookmarks',
-      'flag_message' => 'This post has been added to your bookmarks',
-      'unflag_short' => 'Unbookmark this',
-      'unflag_long' => 'Remove this post from your bookmarks',
-      'unflag_message' => 'This post has been removed from your bookmarks',
-      'types' => array('story', 'forum', 'blog'),
-    );
-    $flag->form_input($configuration);
-    $flag->save();
-  }
-}
-
-/**
  * Implementation of hook_requirements().
  *
  * Prevent installing this module if the "Flag content" module is installed as well.
Index: flag.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/flag/flag.module,v
retrieving revision 1.11.2.72.2.47
diff -u -p -r1.11.2.72.2.47 flag.module
--- flag.module	2 Sep 2010 03:55:54 -0000	1.11.2.72.2.47
+++ flag.module	7 Oct 2010 17:06:33 -0000
@@ -363,6 +363,30 @@ function flag_content_extra_fields($type
 }
 
 /**
+ * Implementation of hook_flag_default_flags().
+ */
+function flag_flag_default_flags() {
+  $flags[] = array(
+    'name' => 'bookmarks',
+    'content_type' => 'node',
+    'global' => 0,
+    'show_on_page' => 1,
+    'show_on_teaser' => 1,
+    'show_on_form' => 1,
+    'title' => 'Bookmarks',
+    'flag_short' => 'Bookmark this',
+    'flag_long' => 'Add this post to your bookmarks',
+    'flag_message' => 'This post has been added to your bookmarks',
+    'unflag_short' => 'Unbookmark this',
+    'unflag_long' => 'Remove this post from your bookmarks',
+    'unflag_message' => 'This post has been removed from your bookmarks',
+    'types' => array('story', 'forum', 'blog'),
+    'api_version' => 2,
+  );
+  return $flags;
+}
+
+/**
  * Implementation of hook_form_alter().
  */
 function flag_form_alter(&$form, &$form_state, $form_id) {
