diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-17 01:36:31 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-17 01:36:31 +0000 |
commit | ce9103a0bcb606cc6b8b177c2244efdc17c9b547 (patch) | |
tree | 217877ac7b6674d7b3385d6169bf72094a2fb2a8 /mod/riverdashboard/start.php | |
parent | bc21e6778ffd5b4b4f2828fd720dc6590870f46f (diff) | |
download | elgg-ce9103a0bcb606cc6b8b177c2244efdc17c9b547.tar.gz elgg-ce9103a0bcb606cc6b8b177c2244efdc17c9b547.tar.bz2 |
updated riverdashboard to load the river item class
git-svn-id: http://code.elgg.org/elgg/trunk@7651 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/riverdashboard/start.php')
-rw-r--r-- | mod/riverdashboard/start.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/mod/riverdashboard/start.php b/mod/riverdashboard/start.php index f7421e1cd..71eef330e 100644 --- a/mod/riverdashboard/start.php +++ b/mod/riverdashboard/start.php @@ -104,7 +104,7 @@ function riverdashboard_ecml_views_hook($hook, $entity_type, $return_value, $par * * @return array|false Depending on success */ -function elgg_get_river_items($subject_guid = 0, $object_guid = 0, $subject_relationship = '', +function riverdashboard_get_river_items($subject_guid = 0, $object_guid = 0, $subject_relationship = '', $type = '', $subtype = '', $action_type = '', $limit = 10, $offset = 0, $posted_min = 0, $posted_max = 0) { @@ -144,7 +144,7 @@ $posted_max = 0) { $where = array(); // river table does not have columns expected by get_access_sql_suffix so we modify its output $where[] = str_replace("and enabled='yes'", '', - str_replace('owner_guid', 'subject_guid', get_access_sql_suffix_new('er', 'e'))); + str_replace('owner_guid', 'subject_guid', riverdashboard_get_access_sql_suffix('er', 'e'))); if (empty($subject_relationship)) { if (!empty($subject_guid)) { @@ -205,7 +205,8 @@ $posted_max = 0) { " ORDER BY e.last_action desc LIMIT {$offset}, {$limit}"; // Get data - return get_data($sql); + //return get_data($sql); + return get_data($sql, 'elgg_row_to_elgg_river_item'); } /** @@ -221,7 +222,7 @@ $posted_max = 0) { * * @return string */ -function get_access_sql_suffix_new($table_prefix_one = '', $table_prefix_two = '', $owner = null) { +function riverdashboard_get_access_sql_suffix($table_prefix_one = '', $table_prefix_two = '', $owner = null) { global $ENTITY_SHOW_HIDDEN_OVERRIDE, $CONFIG; $sql = ""; @@ -314,14 +315,14 @@ function get_access_sql_suffix_new($table_prefix_one = '', $table_prefix_two = ' * * @return string Human-readable river. */ -function elgg_view_river_items_new($subject_guid = 0, $object_guid = 0, $subject_relationship = '', +function riverdashboard_view_river_items($subject_guid = 0, $object_guid = 0, $subject_relationship = '', $type = '', $subtype = '', $action_type = '', $limit = 20, $posted_min = 0, $posted_max = 0, $pagination = true) { // Get input from outside world and sanitise it $offset = (int) get_input('offset', 0); - $riveritems = elgg_get_river_items($subject_guid, $object_guid, $subject_relationship, $type, + $riveritems = riverdashboard_get_river_items($subject_guid, $object_guid, $subject_relationship, $type, $subtype, $action_type, ($limit + 1), $offset, $posted_min, $posted_max); // Get river items, if they exist @@ -346,7 +347,7 @@ $posted_max = 0, $pagination = true) { * * @return string|false Depending on success */ -function elgg_view_river_item_new($item) { +function riverdashboard_view_river_item($item) { if (isset($item->view)) { $object = get_entity($item->object_guid); $subject = get_entity($item->subject_guid); |