forked from MathHubInfo/Legacy-planetary
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathog_ui.module.patch
More file actions
34 lines (32 loc) · 1.77 KB
/
Copy pathog_ui.module.patch
File metadata and controls
34 lines (32 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
*** /home/joe/drupal_planetary/sites/all/modules/og/og_ui/og_ui.module 2012-06-26 15:06:51.735697938 +0100
--- og_ui-new.module 2012-06-26 15:07:57.098876212 +0100
***************
*** 572,583 ****
}
list($id,, $bundle) = entity_extract_ids($entity_type, $entity);
! if (og_is_member($entity_type, $id, 'user', $account, array(OG_STATE_ACTIVE, OG_STATE_PENDING))) {
! if (og_user_access($entity_type, $id, 'unsubscribe', $account)) {
! $links['title'] = t('Unsubscribe from group');
! $links['href'] = "group/$entity_type/$id/unsubscribe";
! }
! }
else {
if (og_is_member($entity_type, $id, 'user', $account, array(OG_STATE_BLOCKED))) {
// If user is blocked, they should not be able to apply for
--- 572,588 ----
}
list($id,, $bundle) = entity_extract_ids($entity_type, $entity);
! if (og_is_member($entity_type, $id, 'user', $account, array(OG_STATE_ACTIVE))) {
! if (og_user_access($entity_type, $id, 'unsubscribe', $account)) {
! $links['title'] = t('Unsubscribe from group');
! $links['href'] = "group/$entity_type/$id/unsubscribe";
! }
! } else if (og_is_member($entity_type, $id, 'user', $account, array(OG_STATE_PENDING))) {
! if (og_user_access($entity_type, $id, 'unsubscribe', $account)) {
! $links['title'] = t("You application is pending. Click here to cancel");
! $links['href'] = "group/$entity_type/$id/unsubscribe";
! }
! }
else {
if (og_is_member($entity_type, $id, 'user', $account, array(OG_STATE_BLOCKED))) {
// If user is blocked, they should not be able to apply for