Changeset 1541
- Timestamp:
- 02/03/08 18:28:53 (10 months ago)
- Files:
-
- devel/mod/community/lib/communities_actions.php (modified) (1 diff)
- devel/mod/community/lib/communities_moderator_of.php (modified) (1 diff)
- devel/mod/community/lib/user_info_menu.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/mod/community/lib/communities_actions.php
r1539 r1541 67 67 case "community:delete": 68 68 $community_id = optional_param('community_id',0,PARAM_INT); 69 $community_name = htmlspecialchars(user_name($community_id), ENT_COMPAT, 'utf-8'); 69 if($community_id == 0) { 70 $profile_name = optional_param('profile_name',''); 71 $community_id = user_info_username('ident',$profile_name); 72 } 73 $community_name = htmlspecialchars(user_name($community_id), ENT_COMPAT, 'utf-8'); 74 70 75 require_confirm(__gettext('Are you sure you want to delete this community?')); 71 76 devel/mod/community/lib/communities_moderator_of.php
r1539 r1541 18 18 $info->icon = run("icons:get",$info->ident); 19 19 $friends_menu = run("community:infobox:menu",array($info)); 20 if (run("permissions:check",array("userdetails:change", $info->ident))) {21 $friends_menu .= "<a href=\"{$CFG->wwwroot}mod/community/index.php?community_id=".$info->ident."&action=community:delete\">Delete community</a>";22 }23 20 $friends_icon = user_icon_html($info->ident,COMMUNITY_ICON_SIZE); 24 21 $link = $CFG->wwwroot.$info->username."/"; devel/mod/community/lib/user_info_menu.php
r1539 r1541 19 19 20 20 if ($info->owner == $_SESSION['userid'] && $info->owner == $profile_id) { 21 $functions[] = "<a href=\"" . $CFG->wwwroot . $info->username . "/profile\">" . __gettext("Administ rate") . "</a>";21 $functions[] = "<a href=\"" . $CFG->wwwroot . $info->username . "/profile\">" . __gettext("Administer") . "</a>"; 22 22 $functions[] = "<a href=\"" . $CFG->wwwroot . $info->username . "/community/delete\">" . __gettext("Delete") . "</a>"; 23 23 if ($profile_id != $_SESSION['userid']) {
