Index: flag.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/flag/Attic/flag.inc,v
retrieving revision 1.1.2.30
diff -u -p -r1.1.2.30 flag.inc
--- flag.inc	14 Mar 2009 06:13:54 -0000	1.1.2.30
+++ flag.inc	22 Jun 2009 09:13:30 -0000
@@ -185,7 +185,7 @@ class flag_flag {
    * Derived classes should want to override this.
    */
   function default_options() {
-    return array(
+    $options = array(
       'flag_short' => '',
       'flag_long' => '',
       'flag_message' => '',
@@ -196,6 +196,10 @@ class flag_flag {
       'unflag_confirmation' => '',
       'link_type' => 'toggle',
     );
+    // Allow other modules to change the default options without needing to 
+    // implement a new flag type.
+    drupal_alter('flag_default_options', $options);
+    return $options;    
   }
 
   /**
Index: flag.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/flag/Attic/flag.module,v
retrieving revision 1.11.2.72
diff -u -p -r1.11.2.72 flag.module
--- flag.module	15 Jun 2009 20:05:42 -0000	1.11.2.72
+++ flag.module	22 Jun 2009 09:13:31 -0000
@@ -827,6 +827,45 @@ function flag_get_counts($content_type, 
 }
 
 /**
+ * Get the number of flagged contents in a flag.
+ * 
+ *  @param
+ *    The flag ID.
+ */
+function flag_get_flag_counts($fid) {
+  return db_result(db_query("SELECT COUNT(*) FROM {flag_content} WHERE fid = %d", $fid));    
+}
+
+/**
+ * Get all flagged content in a flag.
+ * 
+ *  @param
+ *    The flag ID.
+ */
+function flag_get_flagged_content($fid) {
+  $return = array();
+  $result = db_query("SELECT *  FROM {flag_content} WHERE fid = %d", $fid);
+  while ($row = db_fetch_object($result)) {
+    $return[] = $row;
+  }
+  return $return;    
+}
+
+/**
+ * Get fcid from content ID.
+ */
+function flag_get_fcid_from_content_id($content_id) {
+  return db_result(db_query("SELECT fcid FROM {flag_content} WHERE content_id = %d", $content_id));
+}
+
+/**
+ * Get content ID from content fcid.
+ */
+function flag_get_content_id_from_fcid($fcid) {
+  return db_result(db_query("SELECT content_id FROM {flag_content} WHERE fcid = %d", $fcid));
+}
+
+/**
  * Load a single flag either by name or by flag ID.
  *
  * @param $name
