aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/elgglib.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index a05227aa6..5f5c97107 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -330,16 +330,18 @@
/**
* When given a partial view root (eg 'js' or 'page_elements'), returns an array of views underneath it
*
- * @param string $view_root The root view
+ * @param string $view_root The root view
+ * @param string $viewtype Optionally specify a view type other than the current one.
* @return array A list of view names underneath that root view
*/
- function elgg_view_tree($view_root) {
+ function elgg_view_tree($view_root, $viewtype = "") {
global $CONFIG;
static $treecache;
- // Get viewtype
- $viewtype = elgg_get_viewtype();
+ // Get viewtype
+ if (!$viewtype)
+ $viewtype = elgg_get_viewtype();
// Has the treecache been initialised?
if (!isset($treecache)) $treecache = array();