summaryrefslogtreecommitdiff
path: root/core/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'core/helpers')
-rw-r--r--core/helpers/access.php8
-rw-r--r--core/helpers/core_event.php6
2 files changed, 7 insertions, 7 deletions
diff --git a/core/helpers/access.php b/core/helpers/access.php
index 96f4d375..95b9819c 100644
--- a/core/helpers/access.php
+++ b/core/helpers/access.php
@@ -197,7 +197,7 @@ class access_Core {
* @param Group_Model $group
* @return void
*/
- public static function remove_group($group) {
+ public static function delete_group($group) {
foreach (ORM::factory("permission")->find_all() as $perm) {
self::_drop_columns($perm->name, $group->id);
}
@@ -236,9 +236,9 @@ class access_Core {
* @param Item_Model $item
* @return void
*/
- public static function remove_item($item) {
- ORM::factory("access_intent")->where("item_id", $item->id)->delete();
- ORM::factory("access_cache")->where("item_id", $item->id)->delete();
+ public static function delete_item($item) {
+ ORM::factory("access_intent")->where("item_id", $item->id)->find()->delete();
+ ORM::factory("access_cache")->where("item_id", $item->id)->find()->delete();
}
/**
diff --git a/core/helpers/core_event.php b/core/helpers/core_event.php
index 3cf9f12f..f9ab2ed0 100644
--- a/core/helpers/core_event.php
+++ b/core/helpers/core_event.php
@@ -24,7 +24,7 @@ class core_event_Core {
}
public static function group_before_delete($group) {
- access::remove_group($group);
+ access::delete_group($group);
}
public static function photo_created($photo) {
@@ -32,7 +32,7 @@ class core_event_Core {
}
public static function photo_before_delete($photo) {
- access::remove_item($photo);
+ access::delete_item($photo);
}
public static function album_created($album) {
@@ -40,6 +40,6 @@ class core_event_Core {
}
public static function album_before_delete($album) {
- access::remove_item($album);
+ access::delete_item($album);
}
}