Changeset 1248

Show
Ignore:
Timestamp:
11/05/07 19:05:17 (1 year ago)
Author:
diegoramirez
Message:

Units to mod

Files:

Legend:

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

    r1080 r1248  
    2121    //    protect(1); 
    2222 
    23         $title = run("profile:display:name") . " :: ". __gettext("Invite a Community"); 
     23        $title = user_info("name", page_owner()) . " :: ". __gettext("Invite a Community"); 
    2424 
    2525        echo templates_page_draw(array( 
  • devel/mod/community/lib.php

    r1179 r1248  
    2626    global $CFG; 
    2727    global $USER; 
    28     global $metatags; 
    2928 
    3029    require_once (dirname(__FILE__)."/default_template.php"); 
    3130    require_once (dirname(__FILE__)."/lib/communities_config.php"); 
    3231 
    33     $metatags .= "<link rel=\"stylesheet\" href=\"" . $CFG->wwwroot . "mod/community/css.css\" type=\"text/css\" media=\"screen\" />"; 
    34  
    3532    $page_owner = $profile_id; 
    3633 
     
    3835 
    3936    $username= user_info('username', $page_owner); 
     37 
     38    if (isloggedin()) { 
     39        if(COMMUNITY_CONTEXT!="network"){ 
     40          if (defined("context") && context == COMMUNITY_CONTEXT /*&& $page_owner == $_SESSION['userid']*/) { 
     41            $PAGE->menu[] = array( 'name' => 'community', 
     42                                   'html' => "<li><a href=\"{$CFG->wwwroot}{$_SESSION['username']}/communities\" class=\"selected\" >" .__gettext("Your Communities").'</a></li>'); 
     43          } else{ 
     44                $PAGE->menu[] = array( 'name' => 'community', 
     45                                       'html' => "<li><a href=\"{$CFG->wwwroot}{$_SESSION['username']}/communities\" >" .__gettext("Your Communities").'</a></li>'); 
     46          } 
     47        } 
     48    } 
    4049 
    4150    if ($usertype == "community") { 
     
    7887            } 
    7988        } 
    80          
    81         if (defined("context") && context == "profile") { 
    82  
    83             if (run("permissions:check", "profile")) { 
    84                  
    85                 if (!empty($CFG->uses_YUI)) { 
    86                     $PAGE->menu_sub[] = array( 'name' => 'profile:widget:manage', 
    87                         'html' => '<a href="'.$CFG->wwwroot.'mod/widget/manage_widgets.php?owner='.$page_owner.'">' 
    88                         . __gettext("Manage widgets") . '</a>'); 
    89                 } else { 
    90                     $PAGE->menu_sub[] = array( 'name' => 'profile:widget:add', 
    91                         'html' => '<a href="'.$CFG->wwwroot.'mod/profile/add.php?owner='.$page_owner.'">' 
    92                         . __gettext("Add widget") . '</a>'); 
    93                  
    94             } 
    95      
    96             } 
    97         } 
    98          
    9989    } else if ($usertype == "person") { 
    10090 
     
    135125 
    136126    // Add communities to access levels 
    137         include($CFG->dirroot . "mod/community/lib/communities_access_levels.php")
     127        $function['init'][] = $CFG->dirroot . "mod/community/lib/communities_access_levels.php"
    138128        $function['userdetails:init'][] = $CFG->dirroot . "mod/community/lib/userdetails_actions.php"; 
    139129 
     
    142132        $function['communities:init'][] = $CFG->dirroot . "mod/community/lib/communities_actions.php"; 
    143133 
    144     // Communities modifications of friends actions 
    145         //$function['friends:init'][] = $CFG->dirroot . "mod/community/lib/communities_actions.php"; 
    146  
    147134    // Communities bar down the right hand side 
    148135        $function['display:sidebar'][] = $CFG->dirroot . "mod/community/lib/communities_owned.php"; 
     
    150137 
    151138    // 'Communities' aspect to the little menus beneath peoples' icons 
     139        $function['community:infobox:menu'][] = $CFG->dirroot . "mod/community/lib/user_info_menu.php"; 
    152140        $function['users:infobox:menu:text'][] = $CFG->dirroot . "mod/community/lib/user_info_menu_text.php"; 
    153141 
     
    178166        $function['userdetails:edit'][] = $CFG->dirroot . "mod/community/lib/userdetails_edit.php"; 
    179167 
     168    // Get the community members 
     169        $function['community:members:data'][] = $CFG->dirroot ."mod/community/lib/community_members_data.php"; 
     170        $function['community:members:count'][] = $CFG->dirroot ."mod/community/lib/community_members_count.php"; 
     171        $function['community:membership'][] = $CFG->dirroot ."mod/community/lib/community_membership.php"; 
     172        $function['community:membership:check'][] = $CFG->dirroot ."mod/community/lib/community_membership_check.php"; 
     173        $function['community:membership:data'][] = $CFG->dirroot ."mod/community/lib/community_membership_data.php"; 
     174 
     175    // Add/ Remove community members 
     176        $function['community:member:add'][] = $CFG->dirroot ."mod/community/lib/community_member_add.php"; 
     177        $function['community:member:remove'][] = $CFG->dirroot ."mod/community/lib/community_member_remove.php"; 
     178 
     179    // Add owner as member 
     180        listen_for_event("community","publish","community_owner_as_member"); 
     181 
    180182    // Delete users 
    181183        listen_for_event("user","delete","community_user_delete"); 
    182          
    183     // Register file river hook (if there) 
    184         if (function_exists('river_save_event')) 
    185         { 
    186                 listen_for_event('community','publish', 'community_river_hook'); 
    187                 listen_for_event('community','delete', 'community_river_hook'); 
    188      
    189                 river_register_friendlyname_hook('community::community', 'community_get_friendly_name'); 
    190         } 
    191          
    192 
    193  
    194 function community_get_friendly_name($object_type, $object_id) 
    195 
    196         global $CFG; 
    197  
    198         if ($object_type == 'community::community') 
    199         { 
    200                 $record = get_record_sql("SELECT * from {$CFG->prefix}users where ident=$object_id and user_type = 'community'"); 
    201  
    202                 if ($record) 
    203                 { 
    204                         $community = user_info("name", $record->ident); 
    205                         $url = river_get_userurl($record->ident); 
    206                          
    207                         return sprintf(__gettext("the community <a href=\"$url\">%s</a>"), $community); 
    208                 } 
    209         } 
    210  
    211         return ""; 
    212 
    213  
    214 function community_river_hook( $object_type, $event, $object) 
    215 
    216         global $CFG; 
    217  
    218         $userid = ($_SESSION['userid'] == "" ? -1 : $_SESSION['userid']); 
    219         $object_id = $object->ident; 
    220         $object_owner = $object->owner; 
    221         $title = trim($object->name); 
    222  
    223         $username = user_info("name", $userid); 
    224         $weblogname = "<a href=\"" . river_get_userurl($userid) . "\">". user_info("name", $object_id) . "</a>'s"; 
    225         if ($userid == $object_owner) $weblogname = __gettext("their"); 
    226  
    227         if ($username == false) $username = __gettext("Anonymous user"); 
    228          
    229         if ($event == "publish") 
    230                 river_save_event($userid, $object_id, $object_owner, $object_type, "<a href=\"" .  river_get_userurl($userid) . "\">$username</a> created the community <a href=\"{$CFG->wwwroot}{$object->username}\">{$object->name}</a>."); 
    231  
    232         return $object; 
     184
     185 
     186function community_owner_as_member($object_type,$event,$object){ 
     187  global $messages; 
     188  if($object_type=="community" && $event=="publish" && !empty($object->ident)){ 
     189    $_messages = run('community:member:add',array($object->ident)); 
     190    $messages = array_merge($messages,$_messages); 
     191 
     192  } 
     193  return $object; 
    233194} 
    234195 
  • devel/mod/community/lib/communities_access_levels.php

    r1124 r1248  
    55global $USER; 
    66global $CFG; 
    7 global $data; 
    87 
    98if ($communities = get_records_select('users','owner = ? AND user_type = ?',array($USER->ident,'community'))) { 
     
    1312} 
    1413 
    15     if ($communities = get_records_sql("SELECT u.* FROM ".$CFG->prefix."friends f 
     14if ($communities = get_records_sql("SELECT u.* FROM ".$CFG->prefix."friends f 
    1615                                    JOIN ".$CFG->prefix.'users u ON u.ident = f.friend  
    1716                                    WHERE u.user_type = ? AND u.owner <> ? AND f.owner = ?', 
  • devel/mod/community/lib/communities_actions.php

    r1161 r1248  
    1414 
    1515    switch($action) { 
    16      
     16 
    1717        // Create a new community 
    1818        case "community:create": 
     
    3838                        $cid = insert_record('users',$c); 
    3939                        $c->ident = $cid; 
    40      
     40 
    4141                        $rssresult = run("weblogs:rss:publish", array($cid, false)); 
    4242                        $rssresult = run("files:rss:publish", array($cid, false)); 
    4343                        $rssresult = run("profile:rss:publish", array($cid, false)); 
    44      
    45                         $f = new StdClass; 
    46                         $f->owner = $USER->ident; 
    47                         $f->friend = $cid; 
    48                         insert_record('friends',$f); 
     44 
    4945                        plugin_hook("community","publish",$c); 
    5046                        $messages[] = __gettext("Your community was created and you were added as its first member."); 
     
    5551                } 
    5652            } 
    57      
     53 
    5854            // There is deliberately not a break here - creating a community should automatically make you a member. 
    59      
     55 
    6056        // Friend someone 
    6157         case "friend": 
    62              if (!empty($friend_id) && logged_on) { 
    63                  if (user_info("user_type",$friend_id) == "community") { 
    64                      if ($friend = get_record('users','ident',$friend_id)) { 
    65                          $owner = get_record('users','ident',$friend->owner); 
    66                          if ($friend->moderation == "no") { 
    67                              $messages[] = sprintf(__gettext("You joined %s."), stripslashes($friend->name)); 
    68                              if (user_flag_get("emailnotifications",$owner->ident)) { 
    69                                  $message_body = sprintf(__gettext("%s has joined %s!\n\nTo visit this user's profile, click on the following link:\n\n\t". 
    70                                                                          "%s\n\nTo view all community members, click here:\n\n\t%s\n\nRegards,\n\nThe %s team."), 
    71                                                                          $_SESSION['name'], $friend->name, $CFG->wwwroot . user_info("username",$USER->ident) . "/", $CFG->wwwroot . "_communities/members.php?owner=" . $friend_id,$CFG->sitename); 
    72                                  $title = sprintf(__gettext("New %s member"), $friend->name); 
    73                                  notify_user($owner->ident,$title,$message_body); 
    74                              } 
    75                          } else if ($friend->moderation == "yes") { 
    76                              $messages[] = sprintf(__gettext("Membership of %s needs to be approved. Your request has been added to the list."), stripslashes($friend->name)); 
    77                              if (user_flag_get("emailnotifications",$owner->ident)) { 
    78                                  $message_body = sprintf(__gettext("%s has applied to join %s!\n\nTo visit this user's profile, click on the following link:\n\n\t". 
    79                                                                          "%s\n\nTo view all membership requests and approve or deny this user, click here:\n\n\t%s\n\nRegards,\n\nThe %s team."), 
    80                                                                          $_SESSION['name'], $friend->name, $CFG->wwwroot . user_info("username",$USER->ident) . "/", $CFG->wwwroot . "_communities/members.php?owner=" . $friend_id,$CFG->sitename); 
    81                                  $title = sprintf(__gettext("New %s member request"), $friend->name); 
    82                                  notify_user($owner->ident,$title,$message_body); 
    83                              } 
    84                          } else if ($friend->moderation == "priv") { 
    85                              $messages[] = sprintf(__gettext("%s is a private community. Your membership request has been declined."), stripslashes($friend->name)); 
    86                          } 
    87                      } 
    88                  } 
    89              } 
     58             $_messages = run('community:member:add',array($friend_id)); 
     59             $messages = array_merge($messages,$_messages); 
    9060             break; 
    91      
     61 
    9262         // Unfriend someone 
    9363         case "unfriend": 
    94              if (!empty($friend_id) && logged_on) { 
    95                  if (user_type($friend_id) == "community") { 
    96                      $name = user_info('username', $friend_id); 
    97                      $messages[] = sprintf(__gettext("You left %s."), $name); 
    98                  } 
    99              } 
     64             $_messages = run('community:member:remove',array($friend_id)); 
     65             $messages = array_merge($messages,$_messages); 
    10066             break; 
    101      
     67 
    10268        case "community:delete": 
    103             $community_id = optional_param('community_id',0,PARAM_INT); 
    104             if (run("permissions:check",array("userdetails:change", $community_id))) { 
    105                 if (user_delete($community_id)) { 
    106                     // plugin_hook("community","publish",$community_id); 
     69            if (run("permissions:check",array("userdetails:change", $page_owner))) { 
     70                if (user_delete($page_owner)) { 
     71                    plugin_hook("community","publish",$page_owner); 
    10772                    $messages[] = __gettext("The community was deleted."); 
    10873                } else { 
    10974                    $messages[] = __gettext("Error: the community could not be deleted."); 
    11075                } 
    111                 $_SESSION['messages'] = $messages;                 
     76                $_SESSION['messages'] = $messages; 
    11277                header("Location: ".$CFG->wwwroot.$USER->username."/communities"); 
    11378                exit; 
    11479            } 
    11580        break; 
     81 
     82        case "leave": 
     83          $community_name = user_info('name',$profile_id); 
    11684        case "separate": 
    11785          if(!empty($friend_id)){ 
    118             if(user_type($profile_id) == "community"){ 
    119               $name = user_info("username",$friend_id); 
    120               if(delete_records("friends","owner",$friend_id,"friend",$profile_id)){ 
    121                 $messages[] = sprintf(__gettext("%s was removed from your community"),$name); 
    122               } 
    123               else{ 
    124                 $messages = sprintf(__gettext("%s coundn't be removed from your community"),$name); 
    125               } 
    126             } 
     86             $_messages = run('community:member:remove',array($friend_id,$action,$profile_id)); 
     87             $messages = array_merge($messages,$_messages); 
    12788          } 
    12889        break; 
    129      
     90 
    13091        case "weblogs:post:add": 
    13192            if (user_type($page_owner) == "community") { 
     
    13394            } 
    13495            break; 
    135      
     96 
    13697            // Approve a membership request 
    13798        case "community:approve:request": 
     
    156117                     $messages[] = __gettext("An error occurred: the membership request could not be found."); 
    157118                 } 
    158      
     119 
    159120             } 
    160121             break; 
    161      
     122 
    162123             // Reject a membership request 
    163124         case "community:decline:request": 
     
    175136                     $messages[] = __gettext("An error occurred: the membership request could not be found."); 
    176137                 } 
    177      
     138 
    178139             } 
    179140             break; 
    180      
     141 
    181142    } 
    182      
     143 
    183144} 
    184145?> 
  • devel/mod/community/lib/communities_config.php

    r1095 r1248  
    66 * Created on Apr 9, 2007 
    77 * 
    8  * @author Diego Andrés Ramírez Aragón <diego@somosmas.org> 
     8 * @author Diego Andrᅵs Ramᅵrez Aragᅵn <diego@somosmas.org> 
    99 */ 
    1010/** 
     
    4040  * Type: boolean 
    4141  */ 
    42 define('COMMUNITY_ALLOW_COMMUNITY_TYPE_MEMBERS',false); 
     42define('COMMUNITY_ALLOW_COMMUNITY_TYPE_MEMBERS',true); 
    4343?> 
  • devel/mod/community/lib/communities_edit.php

    r1095 r1248  
    77    $user_id = (int) $parameter[0]; 
    88 
    9     $result = get_records_sql('SELECT u.*, f.ident AS friendident FROM '.$CFG->prefix.'friends f 
    10                                JOIN '.$CFG->prefix.'users u ON u.ident = f.friend 
    11                                WHERE f.owner = ? AND u.user_type = ?', array($user_id,'community')); 
     9    $result = run('community:membership:data',array($user_id,true)); 
     10 
    1211    $i = 1; 
    1312    if (!empty($result)) { 
  • devel/mod/community/lib/communities_members.php

    r1095 r1248  
    1010    $community_owner = user_info('owner',$community_id); 
    1111 
    12     if(COMMUNITY_ALLOW_COMMUNITY_TYPE_MEMBERS){ 
    13       $result = get_records_sql('SELECT u.*, f.ident AS friendident FROM '.$CFG->prefix.'friends f 
    14                                JOIN '.$CFG->prefix.'users u ON u.ident = f.owner 
    15                                WHERE f.friend = ?',array($community_id)); 
    16        
    17     } 
    18     else{ 
    19       $result = get_records_sql('SELECT u.*, f.ident AS friendident FROM '.$CFG->prefix.'friends f 
    20                                JOIN '.$CFG->prefix.'users u ON u.ident = f.owner 
    21                                WHERE f.friend = ? AND u.user_type = ?',array($community_id,'person')); 
    22     } 
     12    $result = run('community:members:data',array($community_id)); 
    2313 
    2414    $i = 1; 
  • devel/mod/community/lib/communities_moderator_of.php

    r1235 r1248  
    1717            $info->icon = run("icons:get",$info->ident); 
    1818            $friends_menu = run("community:infobox:menu",array($info)); 
    19             if (run("permissions:check",array("userdetails:change", $info->ident))) { 
    20                 $friends_menu .= "<a href=\"{$CFG->wwwroot}mod/community/index.php?community_id=".$info->ident."&amp;action=community:delete\" onClick=\"return confirm('".__gettext('Are you sure you want to delete this community?')."');\">Delete community</a>"; 
    21             } 
    2219            $friends_icon = user_icon_html($info->ident,COMMUNITY_ICON_SIZE); 
    2320            $link = $CFG->wwwroot.$info->username."/"; 
  • devel/mod/community/lib/community_memberships.php

    r1095 r1248  
    22global $CFG; 
    33global $page_owner; 
    4   
     4 
    55if ($page_owner != -1) { 
    66    if (user_type($page_owner) == "person" || user_type($page_owner) == "external") { 
    7         if ($result = get_records_sql('SELECT DISTINCT u.ident,u.username,u.name FROM '.$CFG->prefix.'friends f 
    8                                        JOIN '.$CFG->prefix.'users u ON u.ident = f.friend 
    9                                        WHERE f.owner = ? AND u.user_type = ? AND u.owner != ?', 
    10                                       array($page_owner,'community',$page_owner))) { 
     7        if ($result = run('community:membership:data',array($page_owner))) { 
    118            $body = "<ul>"; 
    129            foreach($result as $row) { 
     
    2825    } else if (user_type($page_owner) == "community") { 
    2926        $friends = array(); 
    30         if ($result = get_records_sql('SELECT DISTINCT u.ident,1 FROM '.$CFG->prefix.'friends f 
    31                                 JOIN '.$CFG->prefix.'users u ON u.ident = f.owner 
    32                                 WHERE f.friend = ? LIMIT 8',array($page_owner))) { 
     27        if ($result = run('community:members:data',array($page_owner,8))) { 
    3328            foreach($result as $row) { 
    3429                $friends[] = (int)$row->ident; 
  • devel/mod/community/lib/permissions_check.php

    r1144 r1248  
    33global $CFG; 
    44global $page_owner; 
    5   global $messages;    
     5 
    66if (isset($parameter) && $page_owner != -1) { 
    77    if (!is_array($parameter)) { 
    88        switch($parameter) { 
    9              
    10         case    "profile":   
     9 
     10        case    "profile": 
    1111            if (record_exists('users','ident',$page_owner,'owner',$USER->ident,'user_type','community')) { 
    1212                $run_result = true; 
     
    1717            if (record_exists('users','ident',$page_owner,'owner',$USER->ident,'user_type','community')) { 
    1818                $run_result = true; 
    19             }  
     19            } 
    2020            if (empty($run_result)) { 
    21                 if (count_records_sql('SELECT count(u.ident) FROM '.$CFG->prefix.'friends f 
    22                                                  JOIN '.$CFG->prefix.'users u ON u.ident = f.friend 
    23                                                  WHERE u.ident = ? AND f.owner = ? AND u.user_type = ?', 
    24                                       array($page_owner,$USER->ident,'community'))) { 
     21                if(run('community:membership',array($page_owner,$USER->ident))>0){ 
    2522                    $run_result = true; 
    2623                } 
     
    4138        switch($parameter[0]) { 
    4239        case    "files:edit": 
    43         case    "weblog:edit":     
     40        case    "weblog:edit": 
    4441            $owner = $parameter[1]; 
    4542            if (record_exists('users','ident',$owner,'owner',$USER->ident,'user_type','community')) { 
    4643                $run_result = true; 
    47             }  
     44            } 
    4845            if (empty($run_result)) { 
    49                 /* 
    50                 if (count_records_sql('SELECT count(u.ident) FROM '.$CFG->prefix.'friends f 
    51                                                  JOIN '.$CFG->prefix.'users u ON u.ident = f.friend 
    52                                                  WHERE u.ident = ? AND f.owner = ? AND u.user_type = ?', 
    53                                       array($owner,$USER->ident,'community'))) { 
     46                if(run('community:membership',array($page_owner,$USER->ident))){ 
    5447                    $run_result = true; 
    5548                } 
    56                 */ 
    5749            } 
    5850            break; 
  • devel/mod/community/lib/user_info_menu_text.php

    r1080 r1248  
    11<?php 
    2 global $CFG,$USER; 
     2global $CFG, $USER; 
    33global $user_type; 
    44 
    55// If we've been passed a valid user ID as a parameter ... 
    6 if (isset($parameter) && (isset($parameter[0])) && ($parameter[0] != $_SESSION['userid']) && logged_on) { 
     6if (isset ($parameter) && (isset ($parameter[0])) && ($parameter[0] != $_SESSION['userid']) && logged_on) { 
    77 
    8     $user_id = (int) $parameter[0]; 
     8  $user_id= (int) $parameter[0]; 
    99 
    10     if (user_type($user_id) == "community") { 
    11         $result = count_records_sql('SELECT COUNT(u.ident) FROM '.$CFG->prefix.'friends f 
    12                                      LEFT JOIN '.$CFG->prefix.'users u ON u.ident = f.friend 
    13                                      WHERE f.owner = ? AND f.friend = ?', 
    14                                     array($USER->ident,$user_id)); 
    15         if ($result == 0) { 
    16             $moderation = user_info('moderation',$user_id); 
    17             switch($moderation) { 
    18             case "no":        $run_result = "<a href=\"".url."mod/community/index.php?friends_name=".$_SESSION['username']."&amp;action=friend&amp;friend_id=$user_id\" onclick=\"return confirm('". __gettext("Are you sure you want to join this community?") ."')\">" . __gettext("Click here to join this community."). "</a>"; 
    19                 break; 
    20             case "yes":        $run_result = "<a href=\"".url."mod/community/index.php?friends_name=".$_SESSION['username']."&amp;action=friend&amp;friend_id=$user_id\" onclick=\"return confirm('". __gettext("Are you sure you want to apply to join this community?") ."')\">" . __gettext("Click here to apply to join this community."). "</a>"; 
    21                 break; 
    22             case "priv":    $run_result = ""; 
    23                 break; 
    24             } 
    25         } else { 
    26             $run_result = "<a href=\"".url."mod/community/index.php?friends_name=".$_SESSION['username']."&amp;action=unfriend&amp;friend_id=$user_id\" onclick=\"return confirm('". __gettext("Are you sure you want to leave this community?") ."')\">" . __gettext("Click here to leave this community."). "</a>"; 
    27         } 
     10  if (user_type($user_id) == "community") { 
     11    $result= run('community:membership:check', array ( 
     12      $USER->ident, 
     13      $user_id 
     14    )); 
     15    if ($result == 0) { 
     16      $moderation= user_info('moderation', $user_id); 
     17      switch ($moderation) { 
     18        case "no" : 
     19          $run_result= "<a href=\"" . $CFG->wwwroot .$_SESSION['username']. "/community/add/".$user_id."\" onclick=\"return confirm('" . __gettext("Are you sure you want to join this community?") . "')\">" . __gettext("Click here to join this community.") . "</a>"; 
     20          break; 
     21        case "yes" : 
     22          $run_result= "<a href=\"" . $CFG->wwwroot .$_SESSION['username']. "/community/add/".$user_id."\" onclick=\"return confirm('" . __gettext("Are you sure you want to apply to join this community?") . "')\">" . __gettext("Click here to apply to join this community.") . "</a>"; 
     23          break; 
     24        case "priv" : 
     25          $run_result= ""; 
     26          break; 
     27      } 
     28    } else { 
     29      $run_result= "<a href=\"" . $CFG->wwwroot . user_info('username', $user_id) . "/community/leave/" . $_SESSION['userid'] . "\" onclick=\"return confirm('" . __gettext("Are you sure you want to leave this community?") . "')\">" . __gettext("Click here to leave this community.") . "</a>"; 
    2830    } 
     31  } 
    2932} 
    30  
    3133?> 
  • devel/mod/community/requests.php

    r1080 r1248  
    99        run("userdetails:init"); 
    1010        run("profile:init"); 
     11        run("friends:init"); 
    1112        run("communities:init"); 
    1213 
  • devel/mod/community/templates/community_membership_view.html

    r1231 r1248  
    11<td align="left"> 
    2     <span class="member_icon"><a href="{{link}}">{{icon}}</a></span> 
    3     <div class="member_info"> 
    4         <ul> 
    5           <li>{{name}}</li> 
    6           {{functions}} 
    7         </ul> 
    8     </div> 
     2            <span class="member_icon"> 
     3                <a href="{{link}}">{{icon}}</a> 
     4            </span> 
     5        <div class="member_info"> 
     6                <ul> 
     7                  <li>{{name}}</li> 
     8                  {{functions}} 
     9                </ul> 
     10           </div> 
    911</td> 
  • devel/mod/contenttoolbar/js/edit.js

    r1164 r1248  
    324324*/ 
    325325function parseEmbed(text){ 
    326 var embedpattern = /<embed[\w\s\"=;:.&\?\/-]*>\s*<\/embed>/; 
     326var embedpattern = /<(embed|object)[\w\s\"=;:.&\?\/-]*>.*<\/(embed|object)>/; 
    327327var urlpattern = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?\"/;  
    328328var embed = text.match(embedpattern); 
  • devel/mod/file/edit_file.php

    r1081 r1248  
    1717 
    1818        global $page_owner; 
    19