Merge lp:~l3on/drupal-teams/7.x-dev_fixes into lp:~ubuntu-drupal-devs/drupal-teams/7.x-dev

Proposed by Leo Iannacone
Status: Needs review
Proposed branch: lp:~l3on/drupal-teams/7.x-dev_fixes
Merge into: lp:~ubuntu-drupal-devs/drupal-teams/7.x-dev
Diff against target: 51 lines (+10/-8)
1 file modified
openid_teams.module (+10/-8)
To merge this branch: bzr merge lp:~l3on/drupal-teams/7.x-dev_fixes
Reviewer Review Type Date Requested Status
UD Devs Pending
Review via email: mp+116112@code.launchpad.net

Description of the change

Fixed variable name.

To post a comment you must log in.
lp:~l3on/drupal-teams/7.x-dev_fixes updated
5. By Leo Iannacone

Fix variable name "s/acount/account/"

6. By Leo Iannacone

Fixed drupal teams query - Thanks to Devid Antonio Filoni (d.filoni)

Unmerged revisions

6. By Leo Iannacone

Fixed drupal teams query - Thanks to Devid Antonio Filoni (d.filoni)

5. By Leo Iannacone

Fix variable name "s/acount/account/"

4. By Leo Iannacone

Fix variable name

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openid_teams.module'
2--- openid_teams.module 2011-03-07 06:49:19 +0000
3+++ openid_teams.module 2012-09-17 13:16:33 +0000
4@@ -464,7 +464,7 @@
5 ->condition('sid', $form_state['values']['sid'])
6 ->execute();
7 db_update('openid_teams_roles')
8- ->fields(array('sid' => 'NULL'))
9+ ->fields(array('sid' => 0))
10 ->condition('sid', $form_state['values']['sid'])
11 ->execute();
12 $form_state['redirect'] = 'admin/config/services/openid_teams/trusted';
13@@ -516,7 +516,7 @@
14 $teams = get_approved_team_mappings($response['openid.lp.is_member'],
15 $server);
16 }
17- if (empty($teams) && variable_get('openid_teams_limit_to_known', FALSE) && $user->uid != 1) {
18+ if (empty($teams) && variable_get('openid_teams_limit_to_known', FALSE) && $account->uid != 1) {
19 module_load_include('inc', 'user', 'user.pages');
20 user_logout();
21 }
22@@ -558,9 +558,11 @@
23 function clear_team_roles($account) {
24 $assigned_roles = variable_get("openid_assigned_roles_{$account->uid}", "");
25 if (!empty($assigned_roles)) {
26+ $roles = array();
27+ $roles = explode(',', $assigned_roles);
28 db_delete('users_roles')
29 ->condition('uid', $account->uid)
30- ->condition('rid', $acount->roles, 'IN')
31+ ->condition('rid', $roles, 'IN')
32 ->execute();
33 }
34 variable_del("openid_assigned_roles_{$account->uid}");
35@@ -688,11 +690,11 @@
36 $map_ids = array();
37 if (!is_array($mapped_roles)) {
38 $mapped_roles = array();
39- $result = db_select('openid_teams_roles', 'otr');
40- $result->join('openid_teams_trusted', 'ott', 'otr.sid = ott.sid');
41- $result->fields('otr', array('tid', 'rid', 'team'))
42- ->fields('ott', array('server'))
43- ->execute();
44+ $query = db_select('openid_teams_roles', 'otr');
45+ $query->join('openid_teams_trusted', 'ott', 'otr.sid = ott.sid');
46+ $query->fields('otr', array('tid', 'rid', 'team'))
47+ ->fields('ott', array('server'));
48+ $result = $query->execute();
49 foreach ($result as $map) {
50 $mapped_roles[$map->team][] = $map;
51 }

Subscribers

People subscribed via source and target branches

to all changes: