]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
merged [6828] into trunk from 1.7 branch
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 23 Aug 2010 20:34:22 +0000 (20:34 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 23 Aug 2010 20:34:22 +0000 (20:34 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@6855 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/thewire/languages/en.php
mod/thewire/views/default/thewire/profile_status.php

index 0f1055273692b2c1b8d90be40d3cdfe1bc799e76..7a6853dc46c582f6531a8d200ef7124118fe935a 100644 (file)
@@ -28,6 +28,7 @@
                        'thewire:newpost' => 'New wire post',
                        'thewire:addpost' => 'Post to the wire',
                        'thewire:by' => "Wire post by %s",
+                       'thewire:update' => 'update',
 
        
         /**
index 24f6c447bd8e69b9840ee13a647cf0cef47ab779..a313b65ef61390f4451ffcf7145a0bb5efd8946a 100644 (file)
@@ -1,28 +1,33 @@
 <?php
 
-       /**
       * Latest wire post on profile activity page
       */
-        
-       $owner = $vars['entity']->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 = "<p class='entity_subtext'> (" . elgg_view_friendly_time($lw->time_created) . ")</p>";
-               }
+if ($latest_wire) {
+       foreach ($latest_wire as $lw) {
+               $content = $lw->description;
+               $time = "<p class='entity_subtext'> (" . elgg_view_friendly_time($lw->time_created) . ")</p>";
        }
-       
-       if($latest_wire){
-               echo "<div class='wire_post'><div class='wire_post_contents clearfloat radius8'>";
-               echo $content;
-               if($owner == $_SESSION['user']->guid)
-                       echo " <a class='action_button update small' href=\"{$url_to_wire}\">update</a>";
-               echo $time;
-               echo "</div></div>";
+
+       echo "<div class='wire_post'><div class='wire_post_contents clearfloat radius8'>";
+       echo $content;
+       if ($owner == get_loggedin_userid()) {
+               $text = elgg_echo('thewire:update');
+               echo "<a class='action_button update small' href=\"{$url_to_wire}\">$text</a>";
        }
-?>
\ No newline at end of file
+       echo $time;
+       echo "</div></div>";
+}