aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/admin.php4
-rw-r--r--engine/lib/elgglib.php17
-rw-r--r--engine/lib/usersettings.php4
3 files changed, 19 insertions, 6 deletions
diff --git a/engine/lib/admin.php b/engine/lib/admin.php
index c680f0a7f..fc3ffd64c 100644
--- a/engine/lib/admin.php
+++ b/engine/lib/admin.php
@@ -22,14 +22,14 @@
* nb. some pages already exist that you can extend), extend the main view to point to it,
* and add controls to your new view.
*
- * At the moment this is essentially a wrapper around extend_view.
+ * At the moment this is essentially a wrapper around elgg_extend_view().
*
* @param string $new_admin_view The view associated with the control you're adding
* @param string $view The view to extend, by default this is 'admin/main'.
* @param int $priority Optional priority to govern the appearance in the list.
*/
function extend_elgg_admin_page( $new_admin_view, $view = 'admin/main', $priority = 500) {
- return extend_view($view, $new_admin_view, $priority);
+ return elgg_extend_view($view, $new_admin_view, $priority);
}
/**
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 856852729..5cd0a1995 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -1013,8 +1013,9 @@ function set_template_handler($function_name) {
* @param string $view The view to add to.
* @param string $view_name The name of the view to extend
* @param int $priority The priority, from 0 to 1000, to add at (lowest numbers will be displayed first)
+ * @param string $viewtype Not used
*/
-function extend_view($view, $view_name, $priority = 501, $viewtype = '') {
+function elgg_extend_view($view, $view_name, $priority = 501, $viewtype = '') {
global $CONFIG;
if (!isset($CONFIG->views)) {
@@ -1038,6 +1039,18 @@ function extend_view($view, $view_name, $priority = 501, $viewtype = '') {
}
/**
+ * @deprecated 1.7. Use elgg_extend_view().
+ * @param $view
+ * @param $view_name
+ * @param $priority
+ * @param $viewtype
+ */
+function extend_view($view, $view_name, $priority = 501, $viewtype = '') {
+ elgg_log('extend_view() was deprecated in 1.7 by elgg_extend_view()!', 'WARNING');
+ elgg_extend_view($view, $view_name, $priority, $viewtype);
+}
+
+/**
* Set an alternative base location for a view (as opposed to the default of $CONFIG->viewpath)
*
* @param string $view The name of the view
@@ -2372,7 +2385,7 @@ function __elgg_shutdown_hook() {
function elgg_init() {
// Page handler for JS
register_page_handler('js','js_page_handler');
- extend_view('js/initialise_elgg','embed/js');
+ elgg_extend_view('js/initialise_elgg','embed/js');
// Register an event triggered at system shutdown
register_shutdown_function('__elgg_shutdown_hook');
diff --git a/engine/lib/usersettings.php b/engine/lib/usersettings.php
index 24a956a62..4843ffc99 100644
--- a/engine/lib/usersettings.php
+++ b/engine/lib/usersettings.php
@@ -20,14 +20,14 @@
* nb. some pages already exist that you can extend), extend the main view to point to it, and add controls to your
* new view.
*
- * At the moment this is essentially a wrapper around extend_view.
+ * At the moment this is essentially a wrapper around elgg_extend_view().
*
* @param string $new_settings_view The view associated with the control you're adding
* @param string $view The view to extend, by default this is 'usersettings/main'.
* @param int $priority Optional priority to govern the appearance in the list.
*/
function extend_elgg_settings_page( $new_settings_view, $view = 'usersettings/main', $priority = 500) {
- return extend_view($view, $new_settings_view, $priority);
+ return elgg_extend_view($view, $new_settings_view, $priority);
}
function usersettings_pagesetup() {