diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-14 12:54:15 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-14 12:54:15 +0000 |
commit | 53ab8cf80e4990ac1daf17c7a23931d26110e2f5 (patch) | |
tree | bb36b1a57232e43d3f874a09a2e3600af392b853 /engine | |
parent | 964aae2967218c594fe5fcbadfdcada731ef2a6e (diff) | |
download | elgg-53ab8cf80e4990ac1daf17c7a23931d26110e2f5.tar.gz elgg-53ab8cf80e4990ac1daf17c7a23931d26110e2f5.tar.bz2 |
Fixes #2723 members listing pages now in core
git-svn-id: http://code.elgg.org/elgg/trunk@7616 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/upgrades/2010121401.php | 7 | ||||
-rw-r--r-- | engine/lib/users.php | 24 |
2 files changed, 31 insertions, 0 deletions
diff --git a/engine/lib/upgrades/2010121401.php b/engine/lib/upgrades/2010121401.php new file mode 100644 index 000000000..30e4dff32 --- /dev/null +++ b/engine/lib/upgrades/2010121401.php @@ -0,0 +1,7 @@ +<?php +global $CONFIG; + +/** + * Disable members plugin as it has been moved into core. + */ +disable_plugin('members', $CONFIG->site->guid);
\ No newline at end of file diff --git a/engine/lib/users.php b/engine/lib/users.php index a91f143b0..a7153a1be 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -1462,6 +1462,29 @@ function user_create_hook_add_site_relationship($event, $object_type, $object) { } /** + * Members page handler + * + * @param array $page url segments + */ +function elgg_members_page_handler($page) { + global $CONFIG; + + if (!isset($page[0])) { + $page[0] = 'newest'; + } + + $vars = array(); + $vars['page'] = $page[0]; + + if ($page[0] == 'search') { + $vars['search_type'] = $page[1]; + require_once("{$CONFIG->path}pages/members/search.php"); + } else { + require_once("{$CONFIG->path}pages/members/index.php"); + } +} + +/** * Sets up user-related menu items * * @return void @@ -1511,6 +1534,7 @@ function users_init() { register_page_handler('register', 'registration_page_handler'); register_page_handler('resetpassword', 'elgg_user_resetpassword_page_handler'); register_page_handler('login', 'elgg_user_login_page_handler'); + register_page_handler('members', 'elgg_members_page_handler'); elgg_register_action("register", '', 'public'); elgg_register_action("useradd", '', 'public'); |