aboutsummaryrefslogtreecommitdiff
path: root/views/default/river/wrapper.php
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-15 11:06:34 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-15 11:06:34 +0000
commit0f358045ecba1b04a74c198514796fc1dda81d9e (patch)
tree61107a00caf3b572bab86dce7836cd6f814afdc8 /views/default/river/wrapper.php
parent7bfe15a21379a4acef4b989e8bc07d4f556d9b27 (diff)
downloadelgg-0f358045ecba1b04a74c198514796fc1dda81d9e.tar.gz
elgg-0f358045ecba1b04a74c198514796fc1dda81d9e.tar.bz2
Closes #140
git-svn-id: https://code.elgg.org/elgg/trunk@1424 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/river/wrapper.php')
-rw-r--r--views/default/river/wrapper.php74
1 files changed, 39 insertions, 35 deletions
diff --git a/views/default/river/wrapper.php b/views/default/river/wrapper.php
index 0a38b1ac0..fe5c961d5 100644
--- a/views/default/river/wrapper.php
+++ b/views/default/river/wrapper.php
@@ -10,38 +10,42 @@
* @copyright Curverider Ltd 2008
* @link http://elgg.com/
*/
-
- if (isset($vars['entity']) && $vars['entity'] instanceof ElggEntity) {
-
- $subtype = $vars['entity']->getSubtype();
- if (empty($subtype)) $subtype = $vars['entity']->type;
- if (empty($subtype)) $subtype = "general";
-
- } else if ($vars['log']->object_class == "ElggRelationship") {
- $subtype = "relationship_" . $vars['entity']->relationship;
- }
-
-?>
-
-<div class="river_item">
-
- <div class="river_<?php echo $subtype; ?>">
- <div class="river_<?php echo $vars['log']->event; ?>">
- <p class="river_<?php echo $subtype; ?>_<?php echo $vars['log']->event; ?>">
- <?php
-
- echo $vars['entry'];
-
- ?>
- <span class="river_item_time">
- (<?php
-
- echo friendly_time($vars['log']->time_created);
-
- ?>)
- </span>
- </p>
- </div>
- </div>
-
-</div> \ No newline at end of file
+
+ $statement = $vars['statement'];
+ $time = $vars['time'];
+ $event = $vars['event'];
+ $entry = $vars['entry'];
+
+ if ($statement->getObject() instanceof ElggEntity) {
+
+ $obj = $statement->getObject();
+ $subtype = $obj->getSubtype();
+ if (empty($subtype)) $subtype = $obj->type;
+ if (empty($subtype)) $subtype = "general";
+ } else if (is_array($statement->getObject())) {
+ $obj = $statement->getObject();
+ $subtype = "relationship_" . $obj['relationship'];
+ }
+?>
+<div class="river_item">
+
+ <div class="river_<?php echo $subtype; ?>">
+ <div class="river_<?php echo $event; ?>">
+ <p class="river_<?php echo $subtype; ?>_<?php echo $event; ?>">
+ <?php
+
+ echo $vars['entry'];
+
+ ?>
+ <span class="river_item_time">
+ (<?php
+
+ echo friendly_time($time);
+
+ ?>)
+ </span>
+ </p>
+ </div>
+ </div>
+
+</div>