Changeset 15621 for trunk/xmlrpc/BxDolXMLRPCSearch.php
- Timestamp:
- 10/16/11 21:18:03 (7 months ago)
- File:
-
- 1 edited
-
trunk/xmlrpc/BxDolXMLRPCSearch.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xmlrpc/BxDolXMLRPCSearch.php
r15393 r15621 54 54 $sLng = (float)$sLng; 55 55 56 if ((!$sLat || !$sLng) && BxDolRequest::serviceExists('map_profiles', 'get_location')) { 57 $aLocation = BxDolService::call('map_profiles', 'get_location', array($iId, 0, false)); 58 if ($aLocation && !empty($aLocation['lat']) && !empty($aLocation['lng'])) { 59 $sLat = $aLocation['lat']; 60 $sLng = $aLocation['lng']; 61 } 62 } 63 64 if (!$sLat || !$sLng) 65 return new xmlrpcval (array(), "array"); 66 56 67 $sWhere = ''; 57 68 $sJoin = ''; 58 69 $sLocation = ''; 59 if ($sLat && $sLng) 60 { 61 $sDistance = ", (POW($sLat-`loc`.`lat`, 2)+POW($sLng-`loc`.`lng`, 2)) AS `distance`"; 62 $sJoin .= " INNER JOIN `bx_map_profiles` AS `loc` ON (`loc`.`id` = `Profiles`.`ID` AND `loc`.`failed` = 0) "; 63 } 70 71 $sDistance = ", (POW($sLat-`loc`.`lat`, 2)+POW($sLng-`loc`.`lng`, 2)) AS `distance`"; 72 $sJoin .= " INNER JOIN `bx_map_profiles` AS `loc` ON (`loc`.`id` = `Profiles`.`ID` AND `loc`.`failed` = 0) "; 73 64 74 if ($isWithPhotosOnly) 65 75 $sWhere .= " AND `Avatar` ";
Note: See TracChangeset
for help on using the changeset viewer.