Index: flag.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/flag/Attic/flag.install,v
retrieving revision 1.1.2.25
diff -u -r1.1.2.25 flag.install
--- flag.install	3 Dec 2008 14:07:35 -0000	1.1.2.25
+++ flag.install	15 Feb 2009 23:34:34 -0000
@@ -365,6 +365,28 @@
   return $ret;
 }
 
+/**
+ * Remove the previous default views that are no longer bundled with Flag.
+ *
+ * These views are saved to the database so that they are preserved.
+ */
+function flag_update_5003() {
+  $ret = array();
+
+  $flags = flag_get_flags();
+  $disabled_views = variable_get('views_defaults', array());
+  foreach ($flags as $name => $flag) {
+    if ($view = views_get_view('flags_'. $name)) {
+      if ($view->is_default && !isset($disabled_views[$view->name])) {
+        _views_save_view($view);
+        $ret[] = array('success' => TRUE, 'query' => t('The view %name as been saved to the database. Flag no longer provides this view by default.', array('%name' => $view->name)));
+      }
+    }
+  }
+
+  return $ret;
+}
+
 // This is a replacement for update_sql(). The latter doesn't support placeholders.
 function _flag_update_sql($sql) {
   $args = func_get_args();
Index: flag.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/flag/Attic/flag.module,v
retrieving revision 1.1.2.76
diff -u -r1.1.2.76 flag.module
--- flag.module	15 Feb 2009 06:10:15 -0000	1.1.2.76
+++ flag.module	15 Feb 2009 23:34:34 -0000
@@ -395,7 +395,7 @@
  * Theme the output for the main flag administration page.
  */
 function theme_flag_admin_page($flags, $default_flags) {
-  $output = '<p>' . t('This page lists all the <em>flags</em> that are currently defined on this system. You may <a href="@add-url">add</a> new flags.', array('@add-url' => url('admin/build/flags/add'))) . '</p>';
+  $output = '<p>' . t('This page lists all the <em>flags</em> that are currently defined on this system. You may <a href="@add-url">add new flags</a>.', array('@add-url' => url('admin/build/flags/add'))) . '</p>';
 
   // Build out the list of normal, database flags.
   foreach ($flags as $flag) {
@@ -450,7 +450,13 @@
     $output .= '<p>' . t('The <a href="@views-url">Views</a> module is not installed, or not enabled. It is recommended that you install the Views module to be able to easily produce lists of flagged content.', array('@views-url' => url('http://drupal.org/project/views'))) . '</p>';
   }
   else {
-    $output .= '<p>' . t('Once a flag is defined, a new menu item will appear leading to a page showing for each user the items she has flagged by it. In case of <em>global</em> flags, the items flagged are shared by all users. These lists of flagged items <a href="@views-url">are views</a>, and <a href="@customize-url">are customizable</a>.', array('@views-url' => url('admin/build/views'), '@customize-url' => 'http://drupal.org/node/296954')) . '</p>';
+    $output .= '<p>';
+    $output .= t('Lists of flagged content can be displayed using views. You can configure these in the <a href="@views-url">Views administration section</a>.', array('@views-url' => url('admin/build/views')));
+    if (flag_get_flag('bookmarks')) {
+      $output .= ' ' . t('Flag module automatically provides a few <a href="@views-url">default views for the <em>bookmarks</em> flag</a>. You can use these as templates by cloning these views and then customizing as desired.', array('@views-url' => url('admin/build/views')));
+    }
+    $output .= ' ' . t('The <a href="@flag-handbook-url">Flag module handbook</a> contains extensive <a href="@customize-url">documentation on creating customized views</a> using flags.', array('@flag-handbook-url' => 'http://drupal.org/handbook/modules/flag', '@customize-url' => 'http://drupal.org/node/296954'));
+    $output .= '</p>';
   }
 
   if (!module_exists('flag_actions')) {
@@ -460,7 +466,7 @@
     $output .= '<p>' . t('Flagging an item may trigger <a href="@actions-url">actions</a>.', array('@actions-url' => url('admin/build/flags/actions'))) . '</p>';
   }
 
-  $output .= '<p>' . t('To learn about the various ways to use flags, please check out <a href="@handbook-url">the handbook</a>.', array('@handbook-url' => 'http://drupal.org/handbook/modules/flag')) . '</p>';
+  $output .= '<p>' . t('To learn about the various ways to use flags, please check out the <a href="@handbook-url">Flag module handbook</a>.', array('@handbook-url' => 'http://drupal.org/handbook/modules/flag')) . '</p>';
 
   return $output;
 }
Index: includes/flag.views.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/flag/includes/Attic/flag.views.inc,v
retrieving revision 1.1.4.5
diff -u -r1.1.4.5 flag.views.inc
--- includes/flag.views.inc	26 Nov 2008 22:51:44 -0000	1.1.4.5
+++ includes/flag.views.inc	15 Feb 2009 23:34:35 -0000
@@ -327,96 +327,97 @@
  * Implementation of hook_views_default_views().
  */
 function flag_views_default_views() {
-  $flags = flag_get_flags('node'); // Views 1.x supports only nodes.
+  // Only setup views for the "bookmarks" flag.
+  // If it's been deleted, don't create any views.
+  $flag = flag_get_flag('bookmarks');
+  if (!$flag) {
+    return;
+  }
 
-  foreach ($flags as $flag) {
-    $menu_title = $flag->global ? drupal_ucfirst($flag->get_title()) : t('My !flag-title', array('!flag-title' => drupal_strtolower($flag->get_title())));
+  $views = array();
 
-    $view = new stdClass();
-    $view->name = 'flags_'. $flag->name;
-    $view->access = empty($flag->roles) ? array(DRUPAL_AUTHENTICATED_RID) : $flag->roles;
-    $view->description = t('View for flag: !flag-title', array('!flag-title' => $flag->get_title()));
-    $view->page = TRUE;
-    $view->page_title = $menu_title;
-    $view->page_type = 'table';
-    $view->url = 'flags/'. $flag->name;
-    $view->use_pager = TRUE;
-    $view->nodes_per_page = '25';
-    $view->menu = TRUE;
-    $view->menu_tab = FALSE;
-    $view->menu_tab_default = FALSE;
-    $view->sort = array(
-    );
-    $view->argument = array(
-    );
-    $view->field = array(
-      array(
-        'tablename' => 'node',
-        'field' => 'type',
-        'label' => 'Type',
-        'sortable' => '1',
-      ),
-      array(
-        'tablename' => 'node',
-        'field' => 'title',
-        'label' => 'Title',
-        'handler' => 'views_handler_field_nodelink',
+  $view = new stdClass();
+  $view->name = 'flags_'. $flag->name;
+  $view->access = empty($flag->roles) ? array(DRUPAL_AUTHENTICATED_RID) : $flag->roles;
+  $view->description = 'A page listing the current user\'s bookmarks at /bookmarks.';
+  $view->page = TRUE;
+  $view->page_title = 'My bookmarks';
+  $view->page_type = 'table';
+  $view->url = 'bookmarks';
+  $view->use_pager = TRUE;
+  $view->nodes_per_page = '25';
+  $view->menu = TRUE;
+  $view->menu_tab = FALSE;
+  $view->menu_tab_default = FALSE;
+  $view->sort = array();
+  $view->argument = array();
+  $view->field = array(
+    array(
+      'tablename' => 'node',
+      'field' => 'type',
+      'label' => 'Type',
+      'sortable' => '1',
+    ),
+    array(
+      'tablename' => 'node',
+      'field' => 'title',
+      'label' => 'Title',
+      'handler' => 'views_handler_field_nodelink',
+      'sortable' => '1',
+    ),
+    array(
+      'tablename' => 'users',
+      'field' => 'name',
+      'label' => 'Author',
+      'sortable' => '1',
+    ),
+    array(
+      'tablename' => "flag_ops_". $flag->name,
+      'field' => 'ops',
+      'label' => 'Ops',
+    ),
+  );
+  $view->filter = array(
+    array(
+      'tablename' => 'node',
+      'field' => 'status',
+      'operator' => '=',
+      'options' => '',
+      'value' => '1',
+    ),
+    array(
+      'tablename' => "flag_content_". $flag->name,
+      'field' => 'uid',
+      'operator' => 'IS NOT',
+      'options' => '',
+      'value' => '***CURRENT_USER***',
+    ),
+  );
+  $view->requires = array('node', 'users');
+
+  // If comment module exists, append two additional fields to the default
+  // view. If comment module is added later, these fields will be added.
+  if (module_exists('comment')) {
+    $op_field = array_pop($view->field);
+    $view->field = array_merge($view->field, array(
+      array(
+        'tablename' => 'node_comment_statistics',
+        'field' => 'comment_count',
+        'label' => 'Replies',
+        'handler' => 'views_handler_comments_with_new',
         'sortable' => '1',
       ),
       array(
-        'tablename' => 'users',
-        'field' => 'name',
-        'label' => 'Author',
+        'tablename' => 'node_comment_statistics',
+        'field' => 'last_comment_timestamp',
+        'label' => 'Last Post',
+        'handler' => 'views_handler_field_since',
         'sortable' => '1',
+        'defaultsort' => 'DESC',
       ),
-      array(
-        'tablename' => "flag_ops_". $flag->name,
-        'field' => 'ops',
-        'label' => 'Ops',
-      ),
-    );
-    $view->filter = array(
-      array(
-        'tablename' => 'node',
-        'field' => 'status',
-        'operator' => '=',
-        'options' => '',
-        'value' => '1',
-      ),
-      array(
-        'tablename' => "flag_content_". $flag->name,
-        'field' => 'uid',
-        'operator' => 'IS NOT',
-        'options' => '',
-        'value' => '***CURRENT_USER***',
-      ),
-    );
-    $view->requires = array('node', 'users');
-
-    // If comment module exists, append two additional fields to the default
-    // view. If comment module is added later, these fields will be added.
-    if (module_exists('comment')) {
-      $op_field = array_pop($view->field);
-      $view->field = array_merge($view->field, array(
-        array(
-          'tablename' => 'node_comment_statistics',
-          'field' => 'comment_count',
-          'label' => 'Replies',
-          'handler' => 'views_handler_comments_with_new',
-          'sortable' => '1',
-        ),
-        array(
-          'tablename' => 'node_comment_statistics',
-          'field' => 'last_comment_timestamp',
-          'label' => 'Last Post',
-          'handler' => 'views_handler_field_since',
-          'sortable' => '1',
-          'defaultsort' => 'DESC',
-        ),
-      ));
-      array_push($view->field, $op_field);
-      $view->requires = array_merge($view->requires, array('node_comment_statistics'));
-    }
+    ));
+    array_push($view->field, $op_field);
+    $view->requires = array_merge($view->requires, array('node_comment_statistics'));
 
     $views[$view->name] = $view;
   }
