diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-12-13 20:06:20 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-12-13 20:06:20 +0000 |
commit | af8c74f6125478450072fd105d54172dcba1bf8e (patch) | |
tree | 81016a51efe591f0c421a85c101bd664837b3307 /core/helpers | |
parent | d480778108d431b26a2e3413814380943d2d804d (diff) |
Fix a bug where parent permissions were not getting inherited to newly
created albums and photos.
Diffstat (limited to 'core/helpers')
-rw-r--r-- | core/helpers/access.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/helpers/access.php b/core/helpers/access.php index 3fb7548d..badd9b0a 100644 --- a/core/helpers/access.php +++ b/core/helpers/access.php @@ -250,6 +250,10 @@ class access_Core { * @return void */ public static function add_item($item) { + $access_intent = ORM::factory("access_intent", $item->id); + if ($access_intent->loaded) { + throw new Exception("@todo ITEM_ALREADY_ADDED $item->id"); + } $access_intent = ORM::factory("access_intent"); $access_intent->item_id = $item->id; $access_intent->save(); @@ -269,6 +273,7 @@ class access_Core { } } } + $item->save(); $access_cache->save(); } |