aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/elgglib.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 5cd0a1995..88d42ad66 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -510,14 +510,14 @@ function elgg_disable_filepath_cache() {
* @param unknown_type $base
* @return unknown
*/
-function get_views($dir, $base) {
+function elgg_get_views($dir, $base) {
$return = array();
if (file_exists($dir) && is_dir($dir)) {
if ($handle = opendir($dir)) {
while ($view = readdir($handle)) {
if (!in_array($view, array('.','..','.svn','CVS'))) {
if (is_dir($dir . '/' . $view)) {
- if ($val = get_views($dir . '/' . $view, $base . '/' . $view)) {
+ if ($val = elgg_get_views($dir . '/' . $view, $base . '/' . $view)) {
$return = array_merge($return, $val);
}
} else {
@@ -532,6 +532,16 @@ function get_views($dir, $base) {
}
/**
+ * @deprecated 1.7. Use elgg_extend_view().
+ * @param $dir
+ * @param $base
+ */
+function get_views($dir, $base) {
+ elgg_log('get_views() was deprecated in 1.7 by elgg_get_views()!', 'WARNING');
+ elgg_get_views($dir, $base);
+}
+
+/**
* 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
@@ -572,7 +582,7 @@ function elgg_view_tree($view_root, $viewtype = "") {
$root = $location . $viewtype . '/' . $view_root;
if (file_exists($root) && is_dir($root)) {
- $val = get_views($root, $view_root);
+ $val = elgg_get_views($root, $view_root);
if (!is_array($treecache[$view_root])) {
$treecache[$view_root] = array();
}