Changeset 1581

Show
Ignore:
Timestamp:
04/22/08 07:46:44 (3 months ago)
Author:
misja
Message:

Misja Hoebe <misja@curverider.co.uk> Apply attachment:ticket:344:comm_moderation.patch, closes #344 - thanks eavdmeer

Files:

Legend:

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

    r1550 r1581  
    1111if (isset ($parameter)) { 
    1212    $friend_id= $parameter[0]; 
    13     if(!record_exists('friends','friend',$friend_id,'owner',$USER->ident)){ 
    14       $f = new StdClass; 
    15       $f->owner = $USER->ident; 
    16       $f->friend = $friend_id; 
    17       $f->ident = insert_record('friends',$f); 
    18     } 
    19     else{ 
    20         $f = get_record('friends','friend',$friend_id,'owner',$USER->ident); 
    21     } 
    2213    $run_result= array (); 
    2314    if (!empty ($friend_id) && logged_on) { 
     
    2617                $owner= get_record('users', 'ident', $friend->owner); 
    2718                if ($friend->moderation == "no") { 
     19                  if(!record_exists('friends','friend',$friend_id,'owner',$USER->ident)){ 
     20                    $f = new StdClass; 
     21                    $f->owner = $USER->ident; 
     22                    $f->friend = $friend_id; 
     23                    $f->ident = insert_record('friends',$f); 
     24                  } 
     25                  else{ 
     26                    $f = get_record('friends','friend',$friend_id,'owner',$USER->ident); 
     27                  } 
    2828                    $run_result[]= sprintf(__gettext("You joined %s."), stripslashes($friend->name)); 
    2929                    if (user_flag_get("emailnotifications", $owner->ident)) {