diff options
author | Cash Costello <cash.costello@gmail.com> | 2009-08-02 22:47:46 +0000 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2009-08-02 22:47:46 +0000 |
commit | 2af2b7d75abd0cad74988c0b1b21d8e8a8f0d084 (patch) | |
tree | c3291254f63c66fae308b04f47ae8a41a9dd586f | |
parent | bf652f34eb1546f1bff37b4caf80a161e88a416e (diff) | |
download | elgg-2af2b7d75abd0cad74988c0b1b21d8e8a8f0d084.tar.gz elgg-2af2b7d75abd0cad74988c0b1b21d8e8a8f0d084.tar.bz2 |
fixed a core Elgg bug dealing with commenting on untitled objects
-rw-r--r-- | languages/en.php | 2 | ||||
-rw-r--r-- | views/default/annotation/annotate.php | 17 |
2 files changed, 19 insertions, 0 deletions
diff --git a/languages/en.php b/languages/en.php index 76604f543..6890ddfd8 100644 --- a/languages/en.php +++ b/languages/en.php @@ -1,6 +1,8 @@ <?php
$english = array(
+ // hack for core bug
+ 'untitled' => "untitled",
// Menu items and titles
diff --git a/views/default/annotation/annotate.php b/views/default/annotation/annotate.php new file mode 100644 index 000000000..03dd097d8 --- /dev/null +++ b/views/default/annotation/annotate.php @@ -0,0 +1,17 @@ +<?php
+
+ $performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
+ $object = get_entity($vars['item']->object_guid);
+ $url = $object->getURL();
+ $subtype = get_subtype_from_id($object->subtype);
+ $title = $object->title;
+ if (!$title)
+ $title = elgg_echo('untitled');
+
+ $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>";
+
+?>
+
+<?php echo $string; ?>
\ No newline at end of file |