Index: flag.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/flag/flag.module,v
retrieving revision 1.11.2.78
diff -u -F '^[^a-z]*function' -U 10 -r1.11.2.78 flag.module
--- flag.module	8 Jan 2010 04:47:21 -0000	1.11.2.78
+++ flag.module	20 Aug 2010 10:45:47 -0000
@@ -986,22 +986,22 @@     $function = $module . '_flag_default
  * @param $uid
  *   Optional. The user ID whose flags we're checking. If none given, the
  *   current user will be used.
  * @param $reset
  *   Reset the internal cache and execute the SQL query another time.
  *
  * @return $flags
  *   If returning a single node's flags, an array of the structure
  *   [name] => (fid => [fid], uid => [uid] nid => [nid], timestamp => [timestamp])
  *
- *   If returning all nodes, an array of the arrays for each node.
- *   [nid] => [name] => Object from above.
+ *   If returning all nodes, an array of the arrays for each flag.
+ *   [name] => [nid] => Object from above.
  *
  */
 function flag_get_user_flags($content_type, $content_id = NULL, $uid = NULL, $reset = FALSE) {
   static $flagged_content;
 
   if ($reset) {
     $flagged_content = array();
     if (!isset($content_type)) {
       return;
     }
@@ -1015,23 +1015,23 @@ function flag_get_user_flags($content_ty
       $flagged_content[$uid][$content_type][$content_id] = array();
       $result = db_query("SELECT * FROM {flag_content} WHERE content_type = '%s' AND content_id = %d AND (uid = %d OR uid = 0)", $content_type, $content_id, $uid);
       while ($flag_content = db_fetch_object($result)) {
         $flagged_content[$uid][$content_type][$content_id][$flag_names[$flag_content->fid]] = $flag_content;
       }
     }
     return $flagged_content[$uid][$content_type][$content_id];
   }
 
   else {
-    if (!isset($flagged_content[$uid]['all'][$content_type])) {
+    if (!isset($flagged_content[$uid][$content_type]['all'])) {
       $flag_names = _flag_get_flag_names();
-      $flagged_content[$uid]['all'][$content_type] = TRUE;
+      $flagged_content[$uid][$content_type]['all'] = array();
       $result = db_query("SELECT * FROM {flag_content} WHERE content_type = '%s' AND (uid = %d OR uid = 0)", $content_type, $uid);
       while ($flag_content = db_fetch_object($result)) {
         $flagged_content[$uid][$content_type]['all'][$flag_names[$flag_content->fid]][$flag_content->content_id] = $flag_content;
       }
     }
     return $flagged_content[$uid][$content_type]['all'];
   }
 
 }
 
