aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-04 21:05:54 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-04 21:05:54 +0000
commit7433b07dac28a87a8d22bd0dd5fa78effe333255 (patch)
tree76040c3b6de7f82688d9025cf2af88f19dbd804e /engine/lib
parentb2c08a52541a12050ae12bac2dbc8e1f0563c2b0 (diff)
downloadelgg-7433b07dac28a87a8d22bd0dd5fa78effe333255.tar.gz
elgg-7433b07dac28a87a8d22bd0dd5fa78effe333255.tar.bz2
welcome to the new media view - it is being used in the new latest comments module
git-svn-id: http://code.elgg.org/elgg/trunk@7530 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/views.php18
1 files changed, 12 insertions, 6 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php
index 09653e11d..789348567 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -787,19 +787,25 @@ function elgg_view_entity(ElggEntity $entity, $full = false, $bypass = true, $de
* - ElggEntity 'annotation' The annotation being viewed.
*
* @param ElggAnnotation $annotation The annotation to display
- * @param boolean $bypass If false, will not pass to a custom
+ * @param bool $full Display the full view
+ * @param bool $bypass If false, will not pass to a custom
* template handler. {@see set_template_handler()}
- * @param boolean $debug Complain if views are missing
+ * @param bool $debug Complain if views are missing
*
* @return string HTML (etc) to display
*/
-function elgg_view_annotation(ElggAnnotation $annotation, $bypass = true, $debug = false) {
+function elgg_view_annotation(ElggAnnotation $annotation, $full = true, $bypass = true, $debug = false) {
global $autofeed;
$autofeed = true;
+ $params = array(
+ 'annotation' => $annotation,
+ 'full_view' => $full,
+ );
+
$view = $annotation->view;
if (is_string($view)) {
- return elgg_view($view, array('annotation' => $annotation), $bypass, $debug);
+ return elgg_view($view, $params, $bypass, $debug);
}
$name = $annotation->name;
@@ -812,9 +818,9 @@ function elgg_view_annotation(ElggAnnotation $annotation, $bypass = true, $debug
}
if (elgg_view_exists("annotation/{$name}")) {
- return elgg_view("annotation/{$name}", array('annotation' => $annotation), $bypass, $debug);
+ return elgg_view("annotation/{$name}", $params, $bypass, $debug);
} else {
- return elgg_view("annotation/default", array('annotation' => $annotation), $bypass, $debug);
+ return elgg_view("annotation/default", $params, $bypass, $debug);
}
}