Merge branch 'release/0.0.6'

This commit is contained in:
Jonny Barnes 2016-06-28 21:51:41 +01:00
commit 4f580973a7
43 changed files with 33 additions and 34 deletions

View file

@ -13,12 +13,10 @@ env:
- setup=basic
php:
- 7.0.6
- 7.0.7
- 7.0
- nightly
matrix:
allow_failures:
- php: 7.0.7 # A known bug in PHP 7.0.7 stops phpdbg producing code coverage reports
- php: nightly
before_install:

View file

@ -41,8 +41,7 @@ class NotesController extends Controller
}
}
if ($note->place !== null) {
preg_match('/\((.*)\)/', $note->place->location, $matches);
$lnglat = explode(' ', $matches[1]);
$lnglat = explode(' ', $note->place->location);
$note->latitude = $lnglat[1];
$note->longitude = $lnglat[0];
$note->address = $note->place->name;
@ -110,8 +109,7 @@ class NotesController extends Controller
}
}
if ($note->place !== null) {
preg_match('/\((.*)\)/', $note->place->location, $matches);
$lnglat = explode(' ', $matches[1]);
$lnglat = explode(' ', $note->place->location);
$note->latitude = $lnglat[1];
$note->longitude = $lnglat[0];
$note->address = $note->place->name;

View file

@ -32,7 +32,10 @@ class Place extends Model
*
* @var array
*/
protected $postgisFields = [Point::class, Polygon::class];
protected $postgisFields = [
'location' => Point::class,
'polygon' => Polygon::class,
];
/**
* Define the relationship with Notes.
@ -74,18 +77,18 @@ class Place extends Model
return $places;
}
/**
/*
* Convert location to text.
*
* @param text $value
* @return text
*/
*
public function getLocationAttribute($value)
{
$result = DB::select(DB::raw("SELECT ST_AsText('$value')"));
return $result[0]->st_astext;
}
}*/
/**
* Get the latitude from the `location` property.
@ -94,9 +97,7 @@ class Place extends Model
*/
public function getLatitudeAttribute()
{
preg_match('/\((.*)\)/', $this->location, $latlng);
return explode(' ', $latlng[1])[1];
return explode(' ', $this->location)[1];
}
/**
@ -106,9 +107,7 @@ class Place extends Model
*/
public function getLongitudeAttribute()
{
preg_match('/\((.*)\)/', $this->location, $latlng);
return explode(' ', $latlng[1])[0];
return explode(' ', $this->location)[0];
}
/**

View file

@ -1,5 +1,9 @@
# Changelog
## Version 0.0.6 (2016-06-28)
- Better use of `laravel-postgis`
- Change style for inline mini-profile images
## Version 0.0.5 (2016-06-23)
- Automatically send webmentions
- Change `mp-syndicate-to` to `syndicate-to`

22
composer.lock generated
View file

@ -59,16 +59,16 @@
},
{
"name": "aws/aws-sdk-php",
"version": "3.18.19",
"version": "3.18.21",
"source": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-php.git",
"reference": "2ffb032afe91b143293f75b48ec7593659c66ddb"
"reference": "db88adc1569789e7d680809f51a62d2bd3410216"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/2ffb032afe91b143293f75b48ec7593659c66ddb",
"reference": "2ffb032afe91b143293f75b48ec7593659c66ddb",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/db88adc1569789e7d680809f51a62d2bd3410216",
"reference": "db88adc1569789e7d680809f51a62d2bd3410216",
"shasum": ""
},
"require": {
@ -135,7 +135,7 @@
"s3",
"sdk"
],
"time": "2016-06-21 21:41:45"
"time": "2016-06-27 22:52:29"
},
{
"name": "barnabywalters/mf-cleaner",
@ -640,16 +640,16 @@
},
{
"name": "guzzlehttp/psr7",
"version": "1.3.0",
"version": "1.3.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "31382fef2889136415751badebbd1cb022a4ed72"
"reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/31382fef2889136415751badebbd1cb022a4ed72",
"reference": "31382fef2889136415751badebbd1cb022a4ed72",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b",
"reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b",
"shasum": ""
},
"require": {
@ -665,7 +665,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
"dev-master": "1.4-dev"
}
},
"autoload": {
@ -694,7 +694,7 @@
"stream",
"uri"
],
"time": "2016-04-13 19:56:01"
"time": "2016-06-24 23:00:38"
},
{
"name": "indieauth/client",

View file

@ -82,7 +82,7 @@ nav {
white-space: nowrap; }
.mini-h-card img {
display: inline;
height: 1em;
border-radius: 2px;
vertical-align: text-bottom; }

File diff suppressed because one or more lines are too long

View file

@ -82,7 +82,7 @@ nav {
white-space: nowrap; }
.mini-h-card img {
display: inline;
height: 1em;
border-radius: 2px;
vertical-align: text-bottom; }

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

View file

@ -6,7 +6,7 @@
"assets/bower/marked.min.js": "assets/bower/marked-c2a88705e2.min.js",
"assets/bower/sanitize.css": "assets/bower/sanitize-85919f917a.css",
"assets/bower/store2.min.js": "assets/bower/store2-c4daa8f871.min.js",
"assets/css/global.css": "assets/css/global-c8783949cd.css",
"assets/css/global.css": "assets/css/global-5eaecdf53d.css",
"assets/css/projects.css": "assets/css/projects-d945298e4f.css",
"assets/js/form-save.js": "assets/js/form-save-4d4f6e1cb8.js",
"assets/js/links.js": "assets/js/links-c394f9c920.js",

View file

@ -96,7 +96,7 @@ nav {
}
.mini-h-card img {
display: inline;
height: 1em;
border-radius: 2px;
vertical-align: text-bottom;
}