aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-11-11 02:27:26 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-11-11 02:27:26 +0000
commit0c5e0a8a09e51db5eacdd096108548ebabd0ef95 (patch)
tree87febf06c07bf67706b67d940c1a7c8352a418a5 /engine/lib
parent013461dbf883bb61ee65a4dd7f560ba7772f236b (diff)
downloadelgg-0c5e0a8a09e51db5eacdd096108548ebabd0ef95.tar.gz
elgg-0c5e0a8a09e51db5eacdd096108548ebabd0ef95.tar.bz2
get_views deprecated for elgg_get_views (just to be consistent with views api)
git-svn-id: http://code.elgg.org/elgg/trunk@3665 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-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();
}