Author: david
Date: Mon Jun 27 10:25:34 2011
New Revision: 9186
Log:
Fix bug in determining correct group_id for ADMIN permissions
Modified:
trunk/lib/task/migrate/QubitMigrate108.class.php
Modified: trunk/lib/task/migrate/QubitMigrate108.class.php
==============================================================================
--- trunk/lib/task/migrate/QubitMigrate108.class.php Mon Jun 27 10:12:16
2011 (r9185)
+++ trunk/lib/task/migrate/QubitMigrate108.class.php Mon Jun 27 10:25:34
2011 (r9186)
@@ -957,12 +957,18 @@
// Delete existing admin permissions
foreach ($this->data['QubitAclPermission'] as $key => $row)
{
- $group = $this->data['QubitAclGroup'][$row['group_id']];
+ $group_id = $row['group_id'];
+
+ // If group_id points to a QubitAclGroup row, then use `id` column from
+ // that row
+ if (isset($this->data['QubitAclGroup'][$row['group_id']]))
+ {
+ $group_id = $this->data['QubitAclGroup'][$row['group_id']]['id'];
+ }
+
if (
- '<?php echo QubitAclGroup::ADMINISTRATOR_ID."\n" ?>' ==
$row['group_id'] ||
- '<?php echo QubitAclGroup::ADMIN_ID."\n" ?>' == $row['group_id'] ||
- '<?php echo QubitAclGroup::ADMINISTRATOR_ID."\n" ?>' == $group['id'] ||
- '<?php echo QubitAclGroup::ADMIN_ID."\n" ?>' == $group['id']
+ '<?php echo QubitAclGroup::ADMINISTRATOR_ID."\n" ?>' == $group_id ||
+ '<?php echo QubitAclGroup::ADMIN_ID."\n" ?>' == $group_id
)
{
unset($this->data['QubitAclPermission'][$key]);
--
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.com/group/qubit-commits?hl=en.