HomeHelpTrac

Changeset 8747 for trunk/xmlrpc


Ignore:
Timestamp:
01/22/09 05:35:05 (3 years ago)
Author:
Alexander Trofimov
Message:
 
Location:
trunk/xmlrpc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/xmlrpc/BxDolXMLRPCFriends.php

    r8596 r8747  
    4949            return new xmlrpcresp(new xmlrpcval(array('error' => new xmlrpcval(1,"int")), "struct")); 
    5050 
    51         $_GET['show'] = 'friends'; 
    52         $_POST['mem'] = array ($iIdProfile => 'on'); 
    53         $GLOBALS['memberID'] = $iId; 
    54  
    55         ob_start(); 
    56         require_once( BX_DIRECTORY_PATH_ROOT . 'contacts.php' ); 
    57         ob_end_clean(); 
    58  
    59         delFromList( 'FriendList', 'Profile', 'ID'); 
     51        require_once( BX_DIRECTORY_PATH_ROOT . 'templates/tmpl_' . $GLOBALS['tmpl'] . '/scripts/BxTemplCommunicator.php'); 
     52        $aCommunicatorSettings = array ('member_id' => $iId); 
     53        $aMembersList = array ($iIdProfile); 
     54        $oCommunicator = &new BxTemplCommunicator('communicator_page', $aCommunicatorSettings);    
     55        $oCommunicator->execFunction('_deleteRequest', 'FriendList', $aMembersList); 
    6056 
    6157        return new xmlrpcval ('ok'); 
     
    6763        if (!$iIdProfile || !($iId = BxDolXMLRPCUtil::checkLogin ($sUser, $sPwd))) 
    6864            return new xmlrpcresp(new xmlrpcval(array('error' => new xmlrpcval(1,"int")), "struct"));             
    69  
    70         $_GET['show'] = 'friends'; 
    71         $_POST['mem'] = array ($iIdProfile => 'on'); 
    72         $GLOBALS['memberID'] = $iId; 
    73  
    74         ob_start(); 
    75         require_once( BX_DIRECTORY_PATH_ROOT . 'contacts.php' ); 
    76         ob_end_clean(); 
    77  
    78         approveFriendInvites(false); 
     65         
     66        require_once( BX_DIRECTORY_PATH_ROOT . 'templates/tmpl_' . $GLOBALS['tmpl'] . '/scripts/BxTemplCommunicator.php'); 
     67        $aCommunicatorSettings = array ('member_id' => $iId); 
     68        $aMembersList = array ($iIdProfile); 
     69        $oCommunicator = &new BxTemplCommunicator('communicator_page', $aCommunicatorSettings);    
     70        $oCommunicator->execFunction('_acceptFriendInvite', 'FriendList', $aMembersList); 
    7971 
    8072        return new xmlrpcval ('ok'); 
     
    8779            return new xmlrpcresp(new xmlrpcval(array('error' => new xmlrpcval(1,"int")), "struct")); 
    8880 
    89         $_GET['show'] = 'friends'; 
    90         $_POST['mem'] = array ($iIdProfile => 'on'); 
    91         $GLOBALS['memberID'] = $iId; 
    92  
    93         ob_start(); 
    94         require_once( BX_DIRECTORY_PATH_ROOT . 'contacts.php' ); 
    95         ob_end_clean(); 
    96  
    97         delFromList( 'FriendList', 'ID', 'Profile', true); 
     81        require_once( BX_DIRECTORY_PATH_ROOT . 'templates/tmpl_' . $GLOBALS['tmpl'] . '/scripts/BxTemplCommunicator.php'); 
     82        $aCommunicatorSettings = array ('member_id' => $iId); 
     83        $aMembersList = array ($iIdProfile); 
     84        $oCommunicator = &new BxTemplCommunicator('communicator_page', $aCommunicatorSettings);    
     85        $oCommunicator->execFunction( '_deleteRequest', 'FriendList', $aMembersList, array(1, 1)); 
    9886 
    9987        return new xmlrpcval ('ok'); 
  • trunk/xmlrpc/BxDolXMLRPCUtil.php

    r8596 r8747  
    8585        $aProfileInfo = getProfileInfo( $iId );          
    8686        $aImageFile = BxDolService::call('shared_photo', 'get_image', array($aProfileInfo, $sType), 'Search'); 
    87         return $aImageFile['file']; 
     87        return $aImageFile ? $aImageFile['file'] : false; 
    8888    } 
    8989 
Note: See TracChangeset for help on using the changeset viewer.