Skip to content

Commit

Permalink
[Patch] Updating ldap database cache table names
Browse files Browse the repository at this point in the history
  • Loading branch information
nadir committed Mar 31, 2016
1 parent cdd1613 commit 942bf33
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions db_structure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1318,7 +1318,7 @@
</table>

<table>
<name>ldap_groups</name>
<name>cernbox_ldap_groups</name>
<declaration>
<field>
<name>cn</name>
Expand All @@ -1339,7 +1339,7 @@
</table>

<table>
<name>ldap_group_members</name>
<name>cernbox_ldap_group_members</name>
<declaration>
<field>
<name>user_cn</name>
Expand Down Expand Up @@ -1370,7 +1370,7 @@
</table>

<table>
<name>ldap_group_members</name>
<name>cernbox_ldap_group_members</name>
<declaration>
<field>
<name>user_cn</name>
Expand Down
6 changes: 3 additions & 3 deletions lib/ldapupdatecron.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ function insertIntoDatabase($table, $sql, $useLoadData = false)

//cronlog('Inserting groups into database...');

insertIntoDatabase('ldap_groups', buildQuery('ldap_groups', 's', ['cn'], $ldapGroups));
insertIntoDatabase('cernbox_ldap_groups', buildQuery('cernbox_ldap_groups', 's', ['cn'], $ldapGroups));
unset($ldapGroups);

//cronlog('Done');
Expand Down Expand Up @@ -281,13 +281,13 @@ function insertIntoDatabase($table, $sql, $useLoadData = false)

//cronlog('Inserting users into database...');

insertIntoDatabase('ldap_users', buildQuery('ldap_users', 'siss', ['cn','uidnumber','displayname','employeetype'], $ldapUsers));
insertIntoDatabase('cernbox_ldap_users', buildQuery('cernbox_ldap_users', 'siss', ['cn','uidnumber','displayname','employeetype'], $ldapUsers));
unset($ldapUsers);

//cronlog('Done');
//cronlog('Inserting users <-> groups into database...');

insertIntoDatabase('ldap_group_members', buildCVSFile('ss', ['user_cn','group_cn'], $userGroups), true);
insertIntoDatabase('cernbox_ldap_group_members', buildCVSFile('ss', ['user_cn','group_cn'], $userGroups), true);
unset($userGroups);

cronlog('Done');
Expand Down
6 changes: 3 additions & 3 deletions lib/private/cache/ldapdatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

class LDAPDatabase
{
const GROUPS_TABLE = 'ldap_groups';
const USERS_TABLE = 'ldap_users';
const GROUP_MAPPINGS = 'ldap_group_members';
const GROUPS_TABLE = 'cernbox_ldap_groups';
const USERS_TABLE = 'cernbox_ldap_users';
const GROUP_MAPPINGS = 'cernbox_ldap_group_members';

/**
*
Expand Down

0 comments on commit 942bf33

Please sign in to comment.