Author: david
Date: Fri Sep 18 18:40:13 2009
New Revision: 3423
Log:
Fix bug that prevented deleting last group on user/edit page.
Modified:
trunk/apps/qubit/modules/user/actions/editAction.class.php
Modified: trunk/apps/qubit/modules/user/actions/editAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/user/actions/editAction.class.php Fri Sep 18
18:29:19 2009 (r3422)
+++ trunk/apps/qubit/modules/user/actions/editAction.class.php Fri Sep 18
18:40:13 2009 (r3423)
@@ -61,7 +61,7 @@
$criteria->add(QubitAclGroup::ID, 99, Criteria::GREATER_THAN);
foreach (QubitAclGroup::get($criteria) as $group)
{
- $choices[$group->id] = $group->name;
+ $choices[$group->id] = $group->getName(array('cultureFallback' =>
true));
}
$this->form->setDefault($name, $values);
@@ -152,14 +152,16 @@
{
$newGroupIds = $formGroupIds = array();
- if (null == ($groups = $this->form->getValue('groups')))
+ if (null != ($groups = $this->form->getValue('groups')))
{
- return;
+ foreach ($groups as $groupId)
+ {
+ $newGroupIds[$groupId] = $formGroupIds[$groupId] = $groupId;
+ }
}
-
- foreach ($groups as $groupId)
+ else
{
- $newGroupIds[$groupId] = $formGroupIds[$groupId] = $groupId;
+ $newGroupIds = $formGroupIds = array();
}
// Don't re-add existing groups + delete exiting groups that are no longer
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---