Changeset 1541

Show
Ignore:
Timestamp:
02/03/08 18:28:53 (10 months ago)
Author:
ewout
Message:

Remove one of the duplicated "delete community" links on the owned communities screen

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/mod/community/lib/communities_actions.php

    r1539 r1541  
    6767        case "community:delete": 
    6868            $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 
    7075            require_confirm(__gettext('Are you sure you want to delete this community?')); 
    7176 
  • devel/mod/community/lib/communities_moderator_of.php

    r1539 r1541  
    1818            $info->icon = run("icons:get",$info->ident); 
    1919            $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."&amp;action=community:delete\">Delete community</a>"; 
    22             } 
    2320            $friends_icon = user_icon_html($info->ident,COMMUNITY_ICON_SIZE); 
    2421            $link = $CFG->wwwroot.$info->username."/"; 
  • devel/mod/community/lib/user_info_menu.php

    r1539 r1541  
    1919 
    2020  if ($info->owner == $_SESSION['userid'] && $info->owner == $profile_id) { 
    21     $functions[] = "<a href=\"" . $CFG->wwwroot . $info->username . "/profile\">" . __gettext("Administrate") . "</a>"; 
     21    $functions[] = "<a href=\"" . $CFG->wwwroot . $info->username . "/profile\">" . __gettext("Administer") . "</a>"; 
    2222    $functions[] = "<a href=\"" . $CFG->wwwroot . $info->username . "/community/delete\">" . __gettext("Delete") . "</a>"; 
    2323    if ($profile_id != $_SESSION['userid']) {