aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-12 15:01:25 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-12 15:01:25 +0000
commit7dd75ce9cdb524ff27ada917608c2cc1dc31f499 (patch)
tree30f2183aa277054577e5717a5f4a87d86c2ca5e9
parent538da56bb1d9acf787362fe0f34747118b00b261 (diff)
downloadelgg-7dd75ce9cdb524ff27ada917608c2cc1dc31f499.tar.gz
elgg-7dd75ce9cdb524ff27ada917608c2cc1dc31f499.tar.bz2
Refs #3085 moved full_view out of elgg_view_list_item() into $vars to be consistent with other elgg_view* functions
git-svn-id: http://code.elgg.org/elgg/trunk@8659 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/views.php4
-rw-r--r--views/default/page/components/gallery.php3
-rw-r--r--views/default/page/components/list.php3
-rw-r--r--views/rss/layout/objects/list.php3
4 files changed, 6 insertions, 7 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php
index a66b7748b..27abf8f8e 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -1247,7 +1247,6 @@ function elgg_view_form($action, $form_vars = array(), $body_vars = array()) {
* View an item in a list
*
* @param object $item ElggEntity or ElggAnnotation
- * @param bool $full_view Whether to render the full view of the object
* @param array $vars Additional parameters for the rendering
*
* @return string
@@ -1255,6 +1254,9 @@ function elgg_view_form($action, $form_vars = array(), $body_vars = array()) {
* @access private
*/
function elgg_view_list_item($item, $full_view, array $vars = array()) {
+
+ $full_view = elgg_extract('full_view', $vars, false);
+
switch ($item->getType()) {
case 'user':
case 'object':
diff --git a/views/default/page/components/gallery.php b/views/default/page/components/gallery.php
index f57cc99ba..c6764d92f 100644
--- a/views/default/page/components/gallery.php
+++ b/views/default/page/components/gallery.php
@@ -18,7 +18,6 @@ $offset = $vars['offset'];
$limit = $vars['limit'];
$count = $vars['count'];
$pagination = elgg_extract('pagination', $vars, true);
-$full_view = elgg_extract('full_view', $vars, false);
$offset_key = elgg_extract('offset_key', $vars, 'offset');
$position = elgg_extract('position', $vars, 'after');
@@ -50,7 +49,7 @@ foreach ($items as $item) {
$col++;
echo '<td>';
- echo elgg_view_list_item($item, $full_view, $vars);
+ echo elgg_view_list_item($item, $vars);
echo "</td>";
if ($col == $num_columns) {
diff --git a/views/default/page/components/list.php b/views/default/page/components/list.php
index 374922ecd..ae951c89f 100644
--- a/views/default/page/components/list.php
+++ b/views/default/page/components/list.php
@@ -22,7 +22,6 @@ $limit = $vars['limit'];
$count = $vars['count'];
$base_url = $vars['base_url'];
$pagination = elgg_extract('pagination', $vars, true);
-$full_view = elgg_extract('full_view', $vars, false);
$offset_key = elgg_extract('offset_key', $vars, 'offset');
$position = elgg_extract('position', $vars, 'after');
@@ -58,7 +57,7 @@ if (is_array($items) && count($items) > 0) {
$id = "item-{$item->getType()}-{$item->id}";
}
$html .= "<li id=\"$id\" class=\"$item_class\">";
- $html .= elgg_view_list_item($item, $full_view, $vars);
+ $html .= elgg_view_list_item($item, $vars);
$html .= '</li>';
}
$html .= '</ul>';
diff --git a/views/rss/layout/objects/list.php b/views/rss/layout/objects/list.php
index 9892d2779..2650fc006 100644
--- a/views/rss/layout/objects/list.php
+++ b/views/rss/layout/objects/list.php
@@ -6,10 +6,9 @@
*/
$items = $vars['items'];
-$full_view = elgg_extract('full_view', $vars, false);
if (is_array($items) && sizeof($items) > 0) {
foreach ($items as $item) {
- echo elgg_view_list_item($item, $full_view, $vars);
+ echo elgg_view_list_item($item, $vars);
}
} \ No newline at end of file