diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-26 14:23:32 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-26 14:23:32 +0000 |
commit | c1411ffc81908882edaace315c46e500419d2aba (patch) | |
tree | 73ea8aa0a8a10c2a2a85977409f5ff4ae8968115 /engine | |
parent | 1ab250f2a8e90c4aa24ada873f98c81dbdd4ae93 (diff) | |
download | elgg-c1411ffc81908882edaace315c46e500419d2aba.tar.gz elgg-c1411ffc81908882edaace315c46e500419d2aba.tar.bz2 |
Refs #2982 adding and deleting friend collections works - editing does not
git-svn-id: http://code.elgg.org/elgg/trunk@8490 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/users.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php index fd68ef276..1b9a6128b 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -1145,18 +1145,20 @@ function friends_of_page_handler($page_elements) { */ function collections_page_handler($page_elements) { elgg_set_context('friends'); + $base = elgg_get_config('path'); if (isset($page_elements[0])) { if ($page_elements[0] == "add") { set_page_owner(elgg_get_logged_in_user_guid()); collections_submenu_items(); - require_once(dirname(dirname(dirname(__FILE__))) . "/pages/friends/add.php"); + require_once "{$base}pages/friends/collections/add.php"; } else { - if ($user = get_user_by_username($page_elements[0])) { + $user = get_user_by_username($page_elements[0]); + if ($user) { set_page_owner($user->getGUID()); if (elgg_get_logged_in_user_guid() == elgg_get_page_owner_guid()) { collections_submenu_items(); } - require_once(dirname(dirname(dirname(__FILE__))) . "/pages/friends/collections.php"); + require_once "{$base}pages/friends/collections/view.php"; } } } @@ -1566,9 +1568,9 @@ function users_init() { elgg_register_action('avatar/crop'); elgg_register_action('profile/edit'); - elgg_register_action('friends/addcollection'); - elgg_register_action('friends/deletecollection'); - elgg_register_action('friends/editcollection'); + elgg_register_action('friends/collections/add'); + elgg_register_action('friends/collections/delete'); + elgg_register_action('friends/collections/edit'); elgg_register_plugin_hook_handler('entity:icon:url', 'user', 'user_avatar_hook'); |