diff options
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/elgglib.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 8f3196482..3b7735f9f 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -133,13 +133,15 @@ /** * Return the location of a given view. * - * @param string $view The view. + * @param string $view The view.
+ * @param string $viewtype The viewtype */ - function elgg_get_view_location($view) + function elgg_get_view_location($view, $viewtype = '') { global $CONFIG; - - $viewtype = elgg_get_viewtype(); +
+ if (empty($viewtype)) + $viewtype = elgg_get_viewtype(); if (!isset($CONFIG->views->locations[$viewtype][$view])) { if (!isset($CONFIG->viewpath)) { @@ -314,7 +316,7 @@ foreach($viewlist as $priority => $view) { - $view_location = elgg_get_view_location($view); + $view_location = elgg_get_view_location($view, $viewtype); if (file_exists($view_location . "{$viewtype}/{$view}.php") && !include($view_location . "{$viewtype}/{$view}.php")) { $success = false; |