aboutsummaryrefslogtreecommitdiff
path: root/models/model.php
diff options
context:
space:
mode:
authorKevin Jardine <kevinjardine@yahoo.com>2011-06-29 22:49:49 -0700
committerKevin Jardine <kevinjardine@yahoo.com>2011-06-29 22:49:49 -0700
commit52ddfd1b76cb3e5fbb2a31eb5a3c738bb0d61b54 (patch)
tree57933cc7cd122d59867191f6fbca5d3b5041d5b1 /models/model.php
parent0a013cd9833a20d3b6334d80dba581bbbb2ce756 (diff)
parentb92a38c8a696db700beafab2d1538bd74c302d94 (diff)
downloadelgg-52ddfd1b76cb3e5fbb2a31eb5a3c738bb0d61b54.tar.gz
elgg-52ddfd1b76cb3e5fbb2a31eb5a3c738bb0d61b54.tar.bz2
Merge pull request #2 from cash/1.7_and_above
removing functions deprecated in 1.7
Diffstat (limited to 'models/model.php')
-rw-r--r--models/model.php22
1 files changed, 19 insertions, 3 deletions
diff --git a/models/model.php b/models/model.php
index 04a168e55..dcc9506f3 100644
--- a/models/model.php
+++ b/models/model.php
@@ -491,7 +491,11 @@ function event_calendar_get_entities_from_metadata_between_related($meta_start_n
}
}
$related_list = array();
- $related_events = get_entities_from_relationship("display_on_group", $container_guid, TRUE);
+ $related_events = elgg_get_entities_from_relationship(array(
+ 'relationship' => 'display_on_group',
+ 'relationship_guid' => $container_guid,
+ 'inverse_relationship' => TRUE,
+ ));
if ($related_events) {
foreach ($related_events as $event) {
$related_list[$event->guid] = $event;
@@ -719,7 +723,13 @@ function event_calendar_remove_personal_event($event_id,$user_id) {
}
function event_calendar_get_personal_events_for_user($user_id,$limit) {
- $events = get_entities_from_annotations("object", "event_calendar", "personal_event", $user_id,0, 0, 1000);
+ $events = elgg_get_entities_from_annotations(array(
+ 'type' => 'object',
+ 'subtype' => 'event_calendar',
+ 'annotation_names' => 'personal_event',
+ 'annotation_value' => $user_id,
+ 'limit' => 1000,
+ ));
$final_events = array();
if ($events) {
$now = time();
@@ -759,7 +769,13 @@ function event_calendar_security_fields() {
}
function event_calendar_get_events_for_group($group_guid) {
- return get_entities('object','event_calendar',0,"",0,0,false,0,$group_guid);
+ $options = array(
+ 'type' => 'object',
+ 'subtype' => 'event_calendar',
+ 'container_guid' => $group_guid,
+ 'limit' => 0,
+ );
+ return elgg_get_entities($options);
}
function event_calendar_handle_join($event, $object_type, $object) {