Changeset 12175 for trunk/xmlrpc
- Timestamp:
- 08/19/09 04:11:25 (3 years ago)
- Location:
- trunk/xmlrpc
- Files:
-
- 2 edited
-
BxDolXMLRPCUser.php (modified) (1 diff)
-
index.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xmlrpc/BxDolXMLRPCUser.php
r12090 r12175 9 9 } 10 10 11 function getUserLocation ($sUser, $sPwd, $sNick) 12 { 13 if (!($iId = BxDolXMLRPCUtil::checkLogin ($sUser, $sPwd))) 14 return new xmlrpcresp(new xmlrpcval(array('error' => new xmlrpcval(1,"int")), "struct")); 15 16 $iProfileId = getID($sNick, false); 17 $aLocation = BxDolService::call('map_profiles', 'get_location', array($iProfileId, $iId, true)); 18 if (-1 == $aLocation) // access denied 19 return new xmlrpcval("-1"); 20 if (!is_array($aLocation)) // location is undefined 21 return new xmlrpcval("0"); 22 23 return new xmlrpcval(array( 24 'lat' => new xmlrpcval($aLocation['lat']), 25 'lng' => new xmlrpcval($aLocation['lng']), 26 'zoom' => new xmlrpcval($aLocation['zoom']), 27 'type' => new xmlrpcval($aLocation['type']), 28 'address' => new xmlrpcval($aLocation['address']), 29 'country' => new xmlrpcval($aLocation['country']), 30 ), 'struct'); 31 } 32 11 33 function getHomepageInfo($sUser, $sPwd) 12 34 { -
trunk/xmlrpc/index.php
r11963 r12175 72 72 ), 73 73 74 "dolphin.getUserLocation" => array( 75 "function" => "BxDolXMLRPCUser::getUserLocation", 76 "signature" => array (array ($xmlrpcStruct, $xmlrpcString, $xmlrpcString, $xmlrpcString)), 77 "docstring" => "get user location, returns struct on succees, 0 on error, -1 on access denied", 78 ), 79 74 80 // messages 75 81
Note: See TracChangeset
for help on using the changeset viewer.