Changeset 15211 for trunk/xmlrpc/BxDolXMLRPCFriends.php
- Timestamp:
- 06/07/11 23:41:51 (12 months ago)
- File:
-
- 1 edited
-
trunk/xmlrpc/BxDolXMLRPCFriends.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xmlrpc/BxDolXMLRPCFriends.php
r14650 r15211 9 9 return new xmlrpcresp(new xmlrpcval(array('error' => new xmlrpcval(1,"int")), "struct")); 10 10 11 BxDolXMLRPCUtil::setLanguage ($sLang); 11 BxDolXMLRPCUtil::setLanguage ($sLang); 12 12 13 $sFriendsSQL = "14 SELECT `p`.*, `f`.`ID`15 FROM (16 SELECT `ID` AS `ID` FROM `sys_friend_list` WHERE `Profile` = '{$iIdProfile}' AND `Check` =117 UNION18 SELECT `Profile` AS `ID` FROM `sys_friend_list` WHERE `ID` = '{$iIdProfile}' AND `Check` =119 ) AS `f`20 INNER JOIN `Profiles` AS `p` ON `p`.`ID` = `f`.`ID`21 ORDER BY p.`Avatar` DESC22 ";23 $r = db_res($sFriendsSQL);13 $sFriendsSQL = " 14 SELECT `p`.*, `f`.`ID` 15 FROM ( 16 SELECT `ID` AS `ID` FROM `sys_friend_list` WHERE `Profile` = '{$iIdProfile}' AND `Check` =1 17 UNION 18 SELECT `Profile` AS `ID` FROM `sys_friend_list` WHERE `ID` = '{$iIdProfile}' AND `Check` =1 19 ) AS `f` 20 INNER JOIN `Profiles` AS `p` ON `p`.`ID` = `f`.`ID` 21 ORDER BY p.`Avatar` DESC 22 "; 23 $r = db_res($sFriendsSQL); 24 24 25 25 /*$r = db_res ("SELECT `Profiles`.* FROM `sys_friend_list` 26 26 LEFT JOIN `Profiles` ON (`Profiles`.`ID` = `sys_friend_list`.`Profile` AND `sys_friend_list`.`ID` = '$iIdProfile' OR `Profiles`.`ID` = `sys_friend_list`.`ID` AND `sys_friend_list`.`Profile` = '$iIdProfile') 27 WHERE (`sys_friend_list`.`Profile` = '$iIdProfile' OR `sys_friend_list`.`ID` = '$iIdProfile') AND `sys_friend_list`.`Check` = '1' 27 WHERE (`sys_friend_list`.`Profile` = '$iIdProfile' OR `sys_friend_list`.`ID` = '$iIdProfile') AND `sys_friend_list`.`Check` = '1' 28 28 ORDER BY `Profiles`.`Avatar` DESC");*/ 29 29 … … 39 39 if (!($iId = BxDolXMLRPCUtil::checkLogin ($sUser, $sPwd))) 40 40 return new xmlrpcresp(new xmlrpcval(array('error' => new xmlrpcval(1,"int")), "struct")); 41 42 BxDolXMLRPCUtil::setLanguage ($sLang); 41 42 BxDolXMLRPCUtil::setLanguage ($sLang); 43 43 44 44 $r = db_res (" … … 64 64 $aCommunicatorSettings = array ('member_id' => $iId); 65 65 $aMembersList = array ($iIdProfile); 66 $oCommunicator = &new BxTemplCommunicator('communicator_page', $aCommunicatorSettings); 66 $oCommunicator = &new BxTemplCommunicator('communicator_page', $aCommunicatorSettings); 67 67 $oCommunicator->execFunction('_deleteRequest', 'sys_friend_list', $aMembersList); 68 68 … … 74 74 $iIdProfile = BxDolXMLRPCUtil::getIdByNickname ($sNick); 75 75 if (!$iIdProfile || !($iId = BxDolXMLRPCUtil::checkLogin ($sUser, $sPwd))) 76 return new xmlrpcresp(new xmlrpcval(array('error' => new xmlrpcval(1,"int")), "struct")); 77 76 return new xmlrpcresp(new xmlrpcval(array('error' => new xmlrpcval(1,"int")), "struct")); 77 78 78 require_once( BX_DIRECTORY_PATH_ROOT . 'templates/tmpl_' . $GLOBALS['tmpl'] . '/scripts/BxTemplCommunicator.php'); 79 79 $aCommunicatorSettings = array ('member_id' => $iId); 80 80 $aMembersList = array ($iIdProfile); 81 $oCommunicator = &new BxTemplCommunicator('communicator_page', $aCommunicatorSettings); 81 $oCommunicator = &new BxTemplCommunicator('communicator_page', $aCommunicatorSettings); 82 82 $oCommunicator->execFunction('_acceptFriendInvite', 'sys_friend_list', $aMembersList); 83 83 … … 94 94 $aCommunicatorSettings = array ('member_id' => $iId); 95 95 $aMembersList = array ($iIdProfile); 96 $oCommunicator = &new BxTemplCommunicator('communicator_page', $aCommunicatorSettings); 96 $oCommunicator = &new BxTemplCommunicator('communicator_page', $aCommunicatorSettings); 97 97 $oCommunicator->execFunction( '_deleteRequest', 'sys_friend_list', $aMembersList, array(1, 1)); 98 98 … … 106 106 return new xmlrpcresp(new xmlrpcval(array('error' => new xmlrpcval(1,"int")), "struct")); 107 107 108 BxDolXMLRPCUtil::setLanguage ($sLang); 108 BxDolXMLRPCUtil::setLanguage ($sLang); 109 109 110 110 ob_start();
Note: See TracChangeset
for help on using the changeset viewer.