Index: content_complete.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/content_complete/content_complete.module,v
retrieving revision 1.1
diff -r1.1 content_complete.module
216c216,237
<   
---
>   //for profile nodes, there is an unambiguous choice as each user has only one
>   if (module_exists('content_profile') && is_content_profile($content_type)){
>     //handle admin looking at another user's account - their node will be loaded
>     if (user_access('administer nodes') && arg(0) == 'user' && is_numeric(arg(1))) {
>       $node = content_profile_load($content_type, arg(1));
>     }
>     //handle admin looking at another user's profile node
>     if (user_access('administer nodes') && arg(0) == 'node' && is_numeric(arg(1))) {
>       //we do not know if the node being looked at is of the correct type
>       $node = node_load(arg(1));
>       if ($node->type != $content_type) {
>         //default below will be used
>         unset($node);
>       }
>     }
>     if (!$node->nid) {
>       //load user's own profile node
>       global $user;
>       $node = content_profile_load($content_type, $user->uid);
>     }
>     $result = db_query('select nid from node where nid=%d', $node->nid);
>   }
218c239
<   if (user_access('edit any '. $content_type .' content')) {
---
>   else if (user_access('edit any '. $content_type .' content')) {
220c241
<     $result = db_query(db_rewrite_sql($sql), $content_type);
---
>     $result = db_query($sql, $content_type);
225c246
<     $result = db_query(db_rewrite_sql($sql), $content_type, $user->uid);
---
>     $result = db_query($sql, $content_type, $user->uid);
288c309
<   $result = db_query(db_rewrite_sql($sql), $content_type);
---
>   $result = db_query($sql, $content_type);
307c328
<   $result = db_query(db_rewrite_sql($sql));
---
>   $result = db_query($sql);
431d451
<   
433c453
< }
\ No newline at end of file
---
> }
