]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixed invalid variable name that caused embed to ignore custom views for embed content.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 8 Jun 2010 19:55:45 +0000 (19:55 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 8 Jun 2010 19:55:45 +0000 (19:55 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@6402 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/embed/views/default/embed/embed.php

index 954a6c767d4af3de2f7aeb47a2cf8f09b59a996f..ee2bde0069af1383d24420a18eba2f576b24dc62 100644 (file)
@@ -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);