]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
fixed bug in comment river view due to missing }
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 5 Dec 2009 15:44:17 +0000 (15:44 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 5 Dec 2009 15:44:17 +0000 (15:44 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@3726 36083f99-b078-4883-b0ff-0f9b5a30f544

languages/en.php
views/default/annotation/annotate.php

index 8a63d6429ce88ab893c63c81e2725d529bf141e1..8e9171d535deca328c308d031bdb5851b3c12475 100644 (file)
@@ -562,6 +562,7 @@ To remove a widget drag it back to the <b>Widget gallery</b>.",
        'comments' => 'Comments',
        'import' => 'Import',
        'export' => 'Export',
+       'untitled' => 'Untitled',
 
        'up' => 'Up',
        'down' => 'Down',
index b4e68c9b2e0f0e46f3523d5a9723ae8439636104..0348a0ce8cc8015238476d8642b8795884580927 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Elgg AJAX loader
+ * Elgg comment river view 
  *
  * @package Elgg
  * @subpackage Core
@@ -8,29 +8,33 @@
  * @link http://elgg.org/
  */
 
-$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
+$performed_by = get_entity($vars['item']->subject_guid);
 $object = get_entity($vars['item']->object_guid);
 $url = $object->getURL();
 $title = $object->title;
-if(!$title) {
-       $title = 'Untitled';
+if (!$title) {
+       $title = elgg_echo('untitled');
 }
 $subtype = get_subtype_from_id($object->subtype);
+
 //grab the annotation, if one exists
-if($vars['item']->annotation_id != 0) {
+if ($vars['item']->annotation_id != 0) {
        $comment = get_annotation($vars['item']->annotation_id)->value;
 }
 $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
 $string = sprintf(elgg_echo("river:posted:generic"),$url) . " ";
 $string .= elgg_echo("{$subtype}:river:annotate") . " | <a href=\"{$object->getURL()}\">" . $title . "</a>";
 $string .= "<div class=\"river_content_display\">";
-if($comment){
+
+if ($comment) {
        $contents = strip_tags($comment);//this is so we don't get large images etc in the activity river
-       if(strlen($contents) > 200) {
-                       $string .= substr($contents, 0, strpos($contents, ' ', 200)) . "...";
+       if (strlen($contents) > 200) {
+               $string .= substr($contents, 0, strpos($contents, ' ', 200)) . "...";
        } else {
                $string .= $contents;
        }
+}
+
 $string .= "</div>";
 
 echo $string;
\ No newline at end of file