setPermission() already saves the share.
authorJan Schneider <jan@horde.org>
Fri, 28 Jan 2011 14:39:14 +0000 (15:39 +0100)
committerJan Schneider <jan@horde.org>
Fri, 28 Jan 2011 14:39:14 +0000 (15:39 +0100)
ansel/lib/Storage.php
ansel/perms.php
kronolith/lib/Kronolith.php
trean/perms.php

index 3fff108..d38365d 100644 (file)
@@ -213,7 +213,7 @@ class Ansel_Storage
                 }
             }
         }
-        $gallery->setPermission($perm, true);
+        $gallery->setPermission($perm);
 
         /* Initial tags */
         if (count($tags)) {
index 1e8662d..82510b6 100644 (file)
@@ -233,7 +233,6 @@ case 'editforminherit':
         }
 
         $share->setPermission($perm);
-        $share->save();
 
         /* If we were asked to, push permissions to all child shares
          * to. */
index 0fe7c1c..e843aaa 100644 (file)
@@ -1151,7 +1151,6 @@ class Kronolith
                             $perm->addGroupPermission($group_id, $perm_value, false);
                         }
                         $share->setPermission($perm);
-                        $share->save();
                         $GLOBALS['notification']->push(sprintf(_("New calendar created and automatically shared with the following group(s): %s."), implode(', ', $group_list)), 'horde.success');
                     }
                 } catch (Horde_Group_Exception $e) {}
@@ -1940,8 +1939,7 @@ class Kronolith
             }
         }
         try {
-            $share->setPermission($perm, false);
-            $share->save();
+            $share->setPermission($perm);
         } catch (Horde_Share_Exception $e) {
             throw new Kronolith_Exception($e);
         }
index 61190e3..df97ad8 100644 (file)
@@ -217,7 +217,6 @@ case 'editforminherit':
         }
 
         $share->setPermission($perm);
-        $share->save();
 
         /* If we were asked to, push permissions to all child shares
          * to. */