diff options
author | Cash Costello <cash.costello@gmail.com> | 2012-01-24 21:32:03 -0500 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2012-01-24 21:44:43 -0500 |
commit | 5a3390fbb42a787f7c2ba4f13b6a6843d9a90c7b (patch) | |
tree | 476d707a3ecd3b2dc0ca43b3692a0257234ff66a /engine/lib/entities.php | |
parent | 38679b40b4234a4739e14ba418d1cd82110bd02c (diff) | |
download | elgg-5a3390fbb42a787f7c2ba4f13b6a6843d9a90c7b.tar.gz elgg-5a3390fbb42a787f7c2ba4f13b6a6843d9a90c7b.tar.bz2 |
Fixes #4272 where an array of entity types can be used, use array in config object
Diffstat (limited to 'engine/lib/entities.php')
-rw-r--r-- | engine/lib/entities.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 67011b802..2dc0eb8ae 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -960,8 +960,8 @@ function elgg_get_entity_type_subtype_where_sql($table, $types, $subtypes, $pair return ''; } - // these are the only valid types for entities in elgg as defined in the DB. - $valid_types = array('object', 'user', 'group', 'site'); + // these are the only valid types for entities in elgg + $valid_types = elgg_get_config('entity_types'); // pairs override $wheres = array(); @@ -1965,7 +1965,7 @@ function elgg_register_entity_type($type, $subtype = null) { global $CONFIG; $type = strtolower($type); - if (!in_array($type, array('object', 'site', 'group', 'user'))) { + if (!in_array($type, $CONFIG->entity_types)) { return FALSE; } @@ -2000,7 +2000,7 @@ function unregister_entity_type($type, $subtype) { global $CONFIG; $type = strtolower($type); - if (!in_array($type, array('object', 'site', 'group', 'user'))) { + if (!in_array($type, $CONFIG->entity_types)) { return FALSE; } |