| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | <?php | 
| 2 | 2 | |
| 3 | 3 |  class PointsOfInterestAdmin extends ModelAdmin { | 
| 4 | -	private static $managed_models = array('PointsOfInterestLayer','PointOfInterest'); | |
| 4 | +	private static $managed_models = array('PointsOfInterestLayer', 'PointOfInterest'); | |
| 5 | 5 | private static $url_segment = 'poi'; | 
| 6 | 6 | private static $menu_title = 'Points of Interest'; | 
| 7 | 7 | private static $menu_icon = '/mappable/icons/menuicon.png'; | 
| @@ -9,7 +9,7 @@ | ||
| 9 | 9 | 'Name' => 'Varchar' | 
| 10 | 10 | ); | 
| 11 | 11 | |
| 12 | -	private static $summary_fields = array('Name','Lat','Lon'); | |
| 12 | +	private static $summary_fields = array('Name', 'Lat', 'Lon'); | |
| 13 | 13 | |
| 14 | 14 | private static $default_sort = 'Name'; | 
| 15 | 15 | |
| @@ -39,10 +39,10 @@ | ||
| 39 | 39 |  		foreach ($records as $record) { | 
| 40 | 40 | $dob = new DataObject(); | 
| 41 | 41 | //number_format((float)$number, 2, '.', ''); | 
| 42 | - $dob->Latitude = number_format((float)$record['Lat'],3,'.',''); | |
| 43 | - $dob->Longitude = number_format((float)$record['Lon'],3,'.',''); | |
| 42 | + $dob->Latitude = number_format((float)$record['Lat'], 3, '.', ''); | |
| 43 | + $dob->Longitude = number_format((float)$record['Lon'], 3, '.', ''); | |
| 44 | 44 | $dob->Name = $record['Name']; | 
| 45 | - $dob->Distance = number_format((float)$record['distance'],2,'.',''); | |
| 45 | + $dob->Distance = number_format((float)$record['distance'], 2, '.', ''); | |
| 46 | 46 |  			$mapurl = "http://maps.google.com?q={$dob->Latitude},{$dob->Longitude}"; | 
| 47 | 47 | $dob->MapURL = $mapurl; | 
| 48 | 48 |  			$dirurl = "http://maps.google.com?saddr={$latitude},{$longitude}&daddr={$dob->Latitude},{$dob->Longitude}"; | 
| @@ -20,7 +20,7 @@ | ||
| 20 | 20 | $names[] = $field->getName(); | 
| 21 | 21 | } | 
| 22 | 22 | |
| 23 | - error_log(print_r($names,1)); | |
| 23 | + error_log(print_r($names, 1)); | |
| 24 | 24 | } | 
| 25 | 25 | |
| 26 | 26 | } | 
| @@ -20,7 +20,7 @@ discard block | ||
| 20 | 20 | |
| 21 | 21 |  	public function testShowGuideMarkers() { | 
| 22 | 22 |  		$layer = $this->objFromFixture('PointsOfInterestLayer', 'BTS'); | 
| 23 | -		error_log('LAYER: '.$layer->Name); | |
| 23 | +		error_log('LAYER: ' . $layer->Name); | |
| 24 | 24 | $pois = $layer->PointsOfInterest(); | 
| 25 | 25 | $poi = $pois->first(); | 
| 26 | 26 | |
| @@ -43,7 +43,7 @@ discard block | ||
| 43 | 43 | } | 
| 44 | 44 | |
| 45 | 45 | $expected = array( | 
| 46 | - array(13.77965803301,100.54461523531), | |
| 46 | + array(13.77965803301, 100.54461523531), | |
| 47 | 47 | array(13.744081610619, 100.54311513861), | 
| 48 | 48 | array(13.802594511242, 100.55379467004), | 
| 49 | 49 | array(13.74054138487, 100.55545772112), | 
| @@ -9,11 +9,11 @@ | ||
| 9 | 9 |  		$nearPage = $this->objFromFixture('NearestPOIPage', 'StationFinder'); | 
| 10 | 10 |  		$this->logInWithPermission('ADMIN'); | 
| 11 | 11 | $nearPage->doPublish(); | 
| 12 | -		if(Member::currentUser()) { | |
| 12 | +		if (Member::currentUser()) { | |
| 13 | 13 | Member::currentUser()->logOut(); | 
| 14 | 14 | } | 
| 15 | 15 | $link = $nearPage->Link(); | 
| 16 | -		error_log("POI PAGE LINK:".$link); | |
| 16 | +		error_log("POI PAGE LINK:" . $link); | |
| 17 | 17 | |
| 18 | 18 | $url = $link; | 
| 19 | 19 |  		error_log('TRYING URL ' . $url); |