HomeHelpTrac

Ignore:
Timestamp:
06/07/11 23:41:51 (12 months ago)
Author:
Alexander Trofimov
Message:

Code cleaning:

  • converting new lines to \n
  • deleting spaces at the end of every line
  • converting all tabs to 4 spaces
  • automated script for future cleaning was added
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xmlrpc/BxDolXMLRPCFriends.php

    r14650 r15211  
    99            return new xmlrpcresp(new xmlrpcval(array('error' => new xmlrpcval(1,"int")), "struct")); 
    1010 
    11         BxDolXMLRPCUtil::setLanguage ($sLang);  
     11        BxDolXMLRPCUtil::setLanguage ($sLang); 
    1212 
    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); 
     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); 
    2424 
    2525        /*$r = db_res ("SELECT `Profiles`.* FROM `sys_friend_list` 
    2626            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' 
    2828            ORDER BY `Profiles`.`Avatar` DESC");*/ 
    2929 
     
    3939        if (!($iId = BxDolXMLRPCUtil::checkLogin ($sUser, $sPwd))) 
    4040            return new xmlrpcresp(new xmlrpcval(array('error' => new xmlrpcval(1,"int")), "struct")); 
    41      
    42         BxDolXMLRPCUtil::setLanguage ($sLang);  
     41 
     42        BxDolXMLRPCUtil::setLanguage ($sLang); 
    4343 
    4444        $r = db_res (" 
     
    6464        $aCommunicatorSettings = array ('member_id' => $iId); 
    6565        $aMembersList = array ($iIdProfile); 
    66         $oCommunicator = &new BxTemplCommunicator('communicator_page', $aCommunicatorSettings);    
     66        $oCommunicator = &new BxTemplCommunicator('communicator_page', $aCommunicatorSettings); 
    6767        $oCommunicator->execFunction('_deleteRequest', 'sys_friend_list', $aMembersList); 
    6868 
     
    7474        $iIdProfile = BxDolXMLRPCUtil::getIdByNickname ($sNick); 
    7575        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 
    7878        require_once( BX_DIRECTORY_PATH_ROOT . 'templates/tmpl_' . $GLOBALS['tmpl'] . '/scripts/BxTemplCommunicator.php'); 
    7979        $aCommunicatorSettings = array ('member_id' => $iId); 
    8080        $aMembersList = array ($iIdProfile); 
    81         $oCommunicator = &new BxTemplCommunicator('communicator_page', $aCommunicatorSettings);    
     81        $oCommunicator = &new BxTemplCommunicator('communicator_page', $aCommunicatorSettings); 
    8282        $oCommunicator->execFunction('_acceptFriendInvite', 'sys_friend_list', $aMembersList); 
    8383 
     
    9494        $aCommunicatorSettings = array ('member_id' => $iId); 
    9595        $aMembersList = array ($iIdProfile); 
    96         $oCommunicator = &new BxTemplCommunicator('communicator_page', $aCommunicatorSettings);    
     96        $oCommunicator = &new BxTemplCommunicator('communicator_page', $aCommunicatorSettings); 
    9797        $oCommunicator->execFunction( '_deleteRequest', 'sys_friend_list', $aMembersList, array(1, 1)); 
    9898 
     
    106106            return new xmlrpcresp(new xmlrpcval(array('error' => new xmlrpcval(1,"int")), "struct")); 
    107107 
    108         BxDolXMLRPCUtil::setLanguage ($sLang);  
     108        BxDolXMLRPCUtil::setLanguage ($sLang); 
    109109 
    110110        ob_start(); 
Note: See TracChangeset for help on using the changeset viewer.