MFB: [mjr] Fix bug where ownership of a gallery could not be changed (Bug #9391).
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 21 Nov 2010 04:26:55 +0000 (23:26 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 21 Nov 2010 04:27:21 +0000 (23:27 -0500)
ansel/docs/CHANGES
ansel/perms.php

index 8162b02..dc83d67 100644 (file)
@@ -13,7 +13,7 @@ v2.0-git
 v1.1.3-cvs
 ----------
 
-
+[mjr] Fix bug where ownership of a gallery could not be changed (Bug #9391).
 
 
 ------
index ec1dcd3..a38bf93 100644 (file)
@@ -65,7 +65,8 @@ case 'editforminherit':
 
         // Process owner and owner permissions.
         $old_owner = $share->get('owner');
-        $new_owner = Horde_Util::getFormData('owner', $old_owner);
+        $new_owner_backend = Horde_Util::getFormData('owner_select', Horde_Util::getFormData('owner_input', $old_owner));
+        $new_owner = $GLOBALS['registry']->convertUsername($new_owner_backend, true);
         if ($old_owner !== $new_owner && !empty($new_owner)) {
             if ($old_owner != $GLOBALS['registry']->getAuth() && !$registry->isAdmin()) {
                 $notification->push(_("Only the owner or system administrator may change ownership or owner permissions for a share"), 'horde.error');