From c57f6fda15007fd3978fe1a4a987ce98045ebb28 Mon Sep 17 00:00:00 2001 From: cash Date: Mon, 23 Aug 2010 20:34:22 +0000 Subject: merged [6828] into trunk from 1.7 branch git-svn-id: http://code.elgg.org/elgg/trunk@6855 36083f99-b078-4883-b0ff-0f9b5a30f544 --- .../views/default/thewire/profile_status.php | 49 ++++++++++++---------- 1 file changed, 27 insertions(+), 22 deletions(-) (limited to 'mod/thewire/views/default') diff --git a/mod/thewire/views/default/thewire/profile_status.php b/mod/thewire/views/default/thewire/profile_status.php index 24f6c447b..a313b65ef 100644 --- a/mod/thewire/views/default/thewire/profile_status.php +++ b/mod/thewire/views/default/thewire/profile_status.php @@ -1,28 +1,33 @@ guid; - $url_to_wire = $vars['url'] . "pg/thewire/" . $vars['entity']->username; +/** + * Latest wire post on profile activity page + */ + +$owner = $vars['entity']->guid; +$url_to_wire = $vars['url'] . "pg/thewire/" . $vars['entity']->username; - //grab the users latest from the wire - $latest_wire = elgg_get_entities(array('types' => 'object', 'subtypes' => 'thewire', 'owner_guid' => $owner, 'limit' => 1)); +//grab the user's latest from the wire +$params = array( + 'types' => 'object', + 'subtypes' => 'thewire', + 'owner_guid' => $owner, + 'limit' => 1, +); +$latest_wire = elgg_get_entities($params); - if($latest_wire){ - foreach($latest_wire as $lw){ - $content = $lw->description; - $time = "

(" . elgg_view_friendly_time($lw->time_created) . ")

"; - } +if ($latest_wire) { + foreach ($latest_wire as $lw) { + $content = $lw->description; + $time = "

(" . elgg_view_friendly_time($lw->time_created) . ")

"; } - - if($latest_wire){ - echo "
"; - echo $content; - if($owner == $_SESSION['user']->guid) - echo " update"; - echo $time; - echo "
"; + + echo "
"; + echo $content; + if ($owner == get_loggedin_userid()) { + $text = elgg_echo('thewire:update'); + echo "$text"; } -?> \ No newline at end of file + echo $time; + echo "
"; +} -- cgit v1.2.3