]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Merge pull request #374 from beck24/group-profile-forwarding
authorEvan Winslow <evan@elgg.org>
Wed, 10 Oct 2012 04:30:33 +0000 (21:30 -0700)
committerEvan Winslow <evan@elgg.org>
Wed, 10 Oct 2012 04:30:33 +0000 (21:30 -0700)
fixes #4824 - forward 1.7 group profile urls to correct destination in 1.8

1  2 
mod/groups/start.php

index c591410c566dc5beaa4dc99bd5fcccd25e0dee5b,37aa839a9d6b86f14bde7cd161a425425c0d1420..9dca7dc1611fa7b43d2ffcf020f970ad09dac57a
@@@ -194,12 -195,17 +194,21 @@@ function groups_setup_sidebar_menus() 
   */
  function groups_page_handler($page) {
  
+       // forward old profile urls
+       if (is_numeric($page[0])) {
+               $group = get_entity($page[0]);
+               if (elgg_instanceof($group, 'group', '', 'ElggGroup')) {
+                       system_message(elgg_echo('changebookmark'));
+                       forward($group->getURL());
+               }
+       }
+       
        elgg_load_library('elgg:groups');
  
 +      if (!isset($page[0])) {
 +              $page[0] = 'all';
 +      }
 +
        elgg_push_breadcrumb(elgg_echo('groups'), "groups/all");
  
        switch ($page[0]) {