| 1 |
<?php |
<?php |
| 2 |
// $Id: og2list.module,v 1.105 2007/01/05 22:42:36 killes Exp $ |
// $Id: og2list.module,v 1.106 2007/05/07 11:54:05 killes Exp $ |
| 3 |
|
|
| 4 |
// Defines for outgoing mail |
// Defines for outgoing mail |
| 5 |
define('OG2LIST_OUTGOING_NOT_SENT', 1); |
define('OG2LIST_OUTGOING_NOT_SENT', 1); |
| 720 |
$comment = drupal_unpack($comment); |
$comment = drupal_unpack($comment); |
| 721 |
$comment->name = $comment->uid ? $comment->registered_name : $comment->name; |
$comment->name = $comment->uid ? $comment->registered_name : $comment->name; |
| 722 |
if (comment_access('edit', $comment)) { |
if (comment_access('edit', $comment)) { |
| 723 |
return comment_form((array)$comment); |
return comment_form_box((array)$comment); |
| 724 |
} |
} |
| 725 |
else if (($user = user_load(array('uid' => $user->uid))) && ($node = node_load($comment->nid)) && $groups = array_intersect($node->og_groups, array_keys($user->og_groups))) { |
else if (($user = user_load(array('uid' => $user->uid))) && ($node = node_load($comment->nid)) && $groups = array_intersect($node->og_groups, array_keys($user->og_groups))) { |
| 726 |
foreach ($groups as $gid) { |
foreach ($groups as $gid) { |
| 727 |
if ($user->og_groups[$gid]['is_admin'] == 1) { |
if ($user->og_groups[$gid]['is_admin'] == 1) { |
| 728 |
return comment_form((array) $comment); |
return comment_form_box((array) $comment); |
| 729 |
break; |
break; |
| 730 |
} |
} |
| 731 |
} |
} |