diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-06-08 19:55:45 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-06-08 19:55:45 +0000 |
commit | 0677e877ec4a925a26322e38bba170afe4868421 (patch) | |
tree | 5c7d6fe23e4f08ae06e0689c74a02cd3bd05fec1 /mod | |
parent | bc5c708ce76e922bbe0a11ea14d539a684e99af3 (diff) | |
download | elgg-0677e877ec4a925a26322e38bba170afe4868421.tar.gz elgg-0677e877ec4a925a26322e38bba170afe4868421.tar.bz2 |
Fixed invalid variable name that caused embed to ignore custom views for embed content.
git-svn-id: http://code.elgg.org/elgg/trunk@6402 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r-- | mod/embed/views/default/embed/embed.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mod/embed/views/default/embed/embed.php b/mod/embed/views/default/embed/embed.php index 954a6c767..ee2bde006 100644 --- a/mod/embed/views/default/embed/embed.php +++ b/mod/embed/views/default/embed/embed.php @@ -54,7 +54,7 @@ if (!$sections) { $content .= $tabs_html; // build the items and layout. - if ($section != 'upload' || array_key_exists($active_section, $sections)) { + if ($active_section != 'upload' || array_key_exists($active_section, $sections)) { $section_info = $sections[$active_section]; $layout = isset($section_info['layout']) ? $section_info['layout'] : 'list'; @@ -74,17 +74,17 @@ if (!$sections) { $content .= $section_content; } elseif ($embed_info = trigger_plugin_hook('embed_get_items', $active_section, $params, array('items' => array(), 'count' => 0))) { // check if we have an override for this section type. - $view = "embed/$section/item/$layout"; - + $view = "embed/$active_section/item/$layout"; +var_dump($view); if (!elgg_view_exists($view)) { $view = "embed/item/$layout"; } - +var_dump($view); // pull out some common tests // embed requires ECML, but until we have plugin deps working // we need to explicitly check and use a fallback. if ($ecml_enabled = is_plugin_enabled('ecml')){ - $ecml_valid_keyword = ecml_is_valid_keyword($section); + $ecml_valid_keyword = ecml_is_valid_keyword($active_section); } else { $ecml_valid_keyword = FALSE; } @@ -92,10 +92,10 @@ if (!$sections) { $items_content = ''; foreach ($embed_info['items'] as $item) { $item_params = array( - 'section' => $section, + 'section' => $active_section, 'item' => $item, 'ecml_enabled' => $ecml_enabled, - 'ecml_keyword' => ($ecml_valid_keyword) ? $section : 'entity' + 'ecml_keyword' => ($ecml_valid_keyword) ? $active_section : 'entity' ); $items_content .= elgg_view($view, $item_params); |