aboutsummaryrefslogtreecommitdiff
path: root/views/default/river/item.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/river/item.php')
-rw-r--r--views/default/river/item.php28
1 files changed, 22 insertions, 6 deletions
diff --git a/views/default/river/item.php b/views/default/river/item.php
index 94622e272..75767e08d 100644
--- a/views/default/river/item.php
+++ b/views/default/river/item.php
@@ -1,14 +1,30 @@
<?php
/**
- * Layout of a river item
+ * Primary river item view
+ *
+ * Calls the individual view saved for that river item. Most of these
+ * individual river views then use the views in river/elements.
*
* @uses $vars['item'] ElggRiverItem
*/
+// @todo remove this in Elgg 1.9
+global $_elgg_special_river_catch;
+if (!isset($_elgg_special_river_catch)) {
+ $_elgg_special_river_catch = false;
+}
+if ($_elgg_special_river_catch) {
+ // we changed the views a little in 1.8.1 so this catches the plugins that
+ // were updated in 1.8.0 and redirects to the layout view
+ echo elgg_view('river/elements/layout', $vars);
+ return true;
+}
+$_elgg_special_river_catch = true;
+
+
$item = $vars['item'];
-echo elgg_view('page/components/image_block', array(
- 'image' => elgg_view('river/elements/image', $vars),
- 'body' => elgg_view('river/elements/body', $vars),
- 'class' => 'elgg-river-item',
-));
+echo elgg_view($item->getView(), $vars);
+
+
+$_elgg_special_river_catch = false;