item.php 773 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Primary river item view
  4. *
  5. * Calls the individual view saved for that river item. Most of these
  6. * individual river views then use the views in river/elements.
  7. *
  8. * @uses $vars['item'] ElggRiverItem
  9. */
  10. // @todo remove this in Elgg 1.9
  11. global $_elgg_special_river_catch;
  12. if (!isset($_elgg_special_river_catch)) {
  13. $_elgg_special_river_catch = false;
  14. }
  15. if ($_elgg_special_river_catch) {
  16. // we changed the views a little in 1.8.1 so this catches the plugins that
  17. // were updated in 1.8.0 and redirects to the layout view
  18. echo elgg_view('river/elements/layout', $vars);
  19. return true;
  20. }
  21. $_elgg_special_river_catch = true;
  22. $item = $vars['item'];
  23. /* @var ElggRiverItem $item */
  24. echo elgg_view($item->getView(), $vars);
  25. $_elgg_special_river_catch = false;