diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-17 02:24:39 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-17 02:24:39 +0000 |
commit | ac4a1fc0f000f2018ff3bd10883f71d48aed6f62 (patch) | |
tree | 1a227c0621bde75d8b48a9bf7b9c44035d4fa938 /mod/riverdashboard/start.php | |
parent | ce9103a0bcb606cc6b8b177c2244efdc17c9b547 (diff) | |
download | elgg-ac4a1fc0f000f2018ff3bd10883f71d48aed6f62.tar.gz elgg-ac4a1fc0f000f2018ff3bd10883f71d48aed6f62.tar.bz2 |
updated riverdashboard plugin to use new river display code - javascript code currently broken for comments and likes
git-svn-id: http://code.elgg.org/elgg/trunk@7652 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/riverdashboard/start.php')
-rw-r--r-- | mod/riverdashboard/start.php | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/mod/riverdashboard/start.php b/mod/riverdashboard/start.php index 71eef330e..e42bc6e01 100644 --- a/mod/riverdashboard/start.php +++ b/mod/riverdashboard/start.php @@ -205,7 +205,6 @@ $posted_max = 0) { " ORDER BY e.last_action desc LIMIT {$offset}, {$limit}"; // Get data - //return get_data($sql); return get_data($sql, 'elgg_row_to_elgg_river_item'); } @@ -348,6 +347,25 @@ $posted_max = 0, $pagination = true) { * @return string|false Depending on success */ function riverdashboard_view_river_item($item) { + + if (!$item || !$item->getView() || !elgg_view_exists($item->getView())) { + return ''; + } + + $subject = $item->getSubjectEntity(); + $object = $item->getObjectEntity(); + if (!$subject || !$object) { + // subject is disabled or subject/object deleted + return ''; + } + + $vars = array( + 'pict' => elgg_view('core/river/image', array('item' => $item)), + 'body' => elgg_view('riverdashboard/river/body', array('item' => $item)), + 'class' => 'elgg-river-item', + ); + return elgg_view('layout/objects/media', $vars); +/* if (isset($item->view)) { $object = get_entity($item->object_guid); $subject = get_entity($item->subject_guid); @@ -367,4 +385,6 @@ function riverdashboard_view_river_item($item) { )); } return false; + * + */ } |