Changeset 399
- Timestamp:
- 06/14/06 21:09:21 (2 years ago)
- Files:
-
- devel/_communities/requests.php (modified) (1 diff)
- devel/mod/community/lib.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/_communities/requests.php
r296 r399 13 13 14 14 define("context", "network"); 15 templates_page_setup(); 15 16 16 17 // Whose friends are we looking at? devel/mod/community/lib.php
r373 r399 8 8 9 9 $page_owner = $profile_id; 10 11 $usertype = run("users:type:get", $page_owner); 10 12 11 if (context == "network") { 12 13 if (run("users:type:get", $page_owner) == "person") { 14 15 $PAGE->menu_sub[] = array( 'name' => 'community', 16 'html' => a_hrefg("{$CFG->wwwroot}_communities/?owner=$page_owner" , 17 "Communities")); 18 19 $PAGE->menu_sub[] = array( 'name' => 'community:owned', 20 'html' => a_hrefg("{$CFG->wwwroot}_communities/owned.php?owner=$page_owner" , 21 "Owned Communities")); 22 23 } else if (run("users:type:get", $page_owner) == "community") { 13 if ($usertype == "community") { 24 14 25 $PAGE->menu_sub[] = array( 'name' => 'community:members', 26 'html' => a_hrefg("{$CFG->wwwroot}_communities/members.php?owner=$page_owne" , 27 "Community Members")); 28 $PAGE->menu_sub[] = array( 'name' => 'community:requests', 29 'html' => a_hrefg("{$CFG->wwwroot}_communities/requests.php?profile_id=$page_owner", 30 "View membership requests")); 31 } 32 33 } 34 if (context == "profile" && run("users:type:get", $page_owner) == "community") { 35 36 if (run("permissions:check", "profile")) { 15 if (context == "profile") { 37 16 38 17 $PAGE->menu_sub[] = array( 'name' => 'profile:edit', 39 18 'html' => '<a href="'.$CFG->wwwroot.'profile/edit.php?profile_id='.$page_owner.'">' 40 19 . gettext("Edit this profile") . '</a>'); 20 21 } 22 23 /*$PAGE->menu_sub[] = array( 'name' => 'community:members', 24 'html' => a_hrefg("{$CFG->wwwroot}_communities/members.php?owner=$page_owner" , 25 "Community Members"));*/ 26 27 if (run("permissions:check", "profile")) { 41 28 42 29 $PAGE->menu_sub[] = array( 'name' => 'community:pic', … … 51 38 'html' => a_hrefg("{$CFG->wwwroot}_communities/requests.php?profile_id=$page_owner", 52 39 "View membership requests")); 40 41 } 42 43 } else if ($usertype == "person") { 44 45 if (context == "network") { 46 47 $PAGE->menu_sub[] = array( 'name' => 'community', 48 'html' => a_hrefg("{$CFG->wwwroot}_communities/?owner=$page_owner" , 49 "Communities")); 50 51 $PAGE->menu_sub[] = array( 'name' => 'community:owned', 52 'html' => a_hrefg("{$CFG->wwwroot}_communities/owned.php?owner=$page_owner" , 53 "Owned Communities")); 54 53 55 } 54 56
