]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #2615: Viewtype now included in views plugin hooks
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 20 Nov 2010 08:58:28 +0000 (08:58 +0000)
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 20 Nov 2010 08:58:28 +0000 (08:58 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7371 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/views.php

index c296fa1ac3a452c69f42bf77bc89da2e2c26ad2e..f20eabfbfffbc74b8a9655d26b66bd328982253a 100644 (file)
@@ -326,16 +326,15 @@ function elgg_view($view, $vars = array(), $bypass = false, $debug = false, $vie
        $content = ob_get_clean();
 
        // Plugin hook
-       $content = elgg_trigger_plugin_hook('view', $view_orig,
-               array('view' => $view_orig, 'vars' => $vars), $content);
+       $params = array('view' => $view_orig, 'vars' => $vars, 'viewtype' => $viewtype);
+       $content = elgg_trigger_plugin_hook('view', $view_orig, $params, $content);
 
-       // backward compatibility with less grandular hook will be gone in 2.0
-       $params = array('view' => $view_orig, 'vars' => $vars);
+       // backward compatibility with less granular hook will be gone in 2.0
        $content_tmp = elgg_trigger_plugin_hook('display', 'view', $params, $content);
 
        if ($content_tmp != $content) {
                $content = $content_tmp;
-               elgg_deprecated_notice('The display:view plugin hook is deprecated by view:view_name or view:all', 1.8);
+               elgg_deprecated_notice('The display:view plugin hook is deprecated by view:view_name', 1.8);
        }
 
        return $content;