Skip to content
Snippets Groups Projects
Commit b50f8eee authored by Tim Steiner's avatar Tim Steiner
Browse files

more of the same... :(

parent 178cb187
No related branches found
Tags
No related merge requests found
......@@ -109,7 +109,8 @@ class GroupImpliedMemberships extends Nmc_Db_Table
}
$groupIds[] = -1;
$where = $db->quoteInto('id IN(?)', $groupIds);
$groupPrimaryKeyName = Groups::getInstance()->getPrimaryKeyName();
$where = $db->quoteInto('`' . $groupPrimaryKeyName . '` IN(?)', $groupIds);
$groups = Groups::getInstance()->fetchAllWithoutPrimaries($where);
return $groups;
}
......@@ -145,7 +146,8 @@ class GroupImpliedMemberships extends Nmc_Db_Table
$userIds = $this->_db->fetchCol($select);
$userIds[] = -1;
$where = $this->_db->quoteInto('id IN(?)', $userIds);
$userPrimaryKeyName = Users::getInstance()->getPrimaryKeyName();
$where = $this->_db->quoteInto('`' . $userPrimaryKeyName . '` IN(?)', $userIds);
$users = Users::getInstance()->fetchAll($where);
return $users;
}
......
......@@ -51,9 +51,9 @@
array('size' => 32)); ?>
<label for="groups">Groups:</label>
<?php echo $this->formSelect('groups',
$this->user->getGroups(false)->columnToArray('id'),
$this->user->getGroups(false)->columnToArray(Groups::getInstance()->getPrimaryKeyName(true)),
array('multiple' => 'multiple'),
$this->groups->columnToArray('name', 'id')); ?>
$this->groups->columnToArray('name', Groups::getInstance()->getPrimaryKeyName(true))); ?>
<?php echo $this->formSubmit('Submit', 'Submit'); ?>
</form>
</div>
......@@ -73,15 +73,16 @@
$this->group->description,
array('rows' => 5, 'cols' => 50)); ?>
<label for="groups">Groups:</label>
<?php print_r($this->group->getGroups(false)); ?>
<?php echo $this->formSelect('groups',
$this->group->getGroups(false)->columnToArray('id'),
$this->group->getGroups(false)->columnToArray(Groups::getInstance()->getPrimaryKeyName(true)),
array('multiple' => 'multiple'),
$this->groups->columnToArray('name', 'id')); ?>
$this->groups->columnToArray('name', Groups::getInstance()->getPrimaryKeyName(true))); ?>
<label for="users">Users:</label>
<?php echo $this->formSelect('users',
$this->group->getUsers(false)->columnToArray('id'),
$this->group->getUsers(false)->columnToArray(Users::getInstance()->getPrimaryKeyName(true)),
array('multiple' => 'multiple'),
$this->users->columnToArray('userName', 'id')); ?>
$this->users->columnToArray('userName', Users::getInstance()->getPrimaryKeyName(true))); ?>
<?php echo $this->formSubmit('Submit', 'Submit'); ?>
</form>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment