diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..b2e2ec6 --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,3 @@ +# Code of Conduct + +Don't be a twat. \ No newline at end of file diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..c2109e1 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,32 @@ +# Contributing + +### New Features + +You can request new features by submitting an issue with `[FR]` prefix in the title. + +### Bugs + +If you find a bug, submit an issue and I promise I will get around to it. Eventually. +Make sure you search around to see if the same (or similar) issue exists before +submitting a new one. + +Know how to fix a bug and have too much spare time on your hands? Submit a Pull Request! +Check out the code conventions below before hand. + +## Code Conventions + +In addition to [Crafts Guidelines](https://github.com/craftcms/docs/blob/v3/en/coding-guidelines.md): + +- Use tabs (4 spaces) +- Try to keep within the 80 characters line length +- If function arguments or array values can't fit on one line, break each value onto it's own line +- Comment as much as possible + +#### JavaScript + +In addition to the above: + +- Write valid ES6 +- Use double quotes `"` + +Don't follow my example, try to stick to the above guidelines! \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..18021ec --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,7 @@ +Fixes # . + +Changes proposed in this pull request: + +- +- +- \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 2882f14..80a864c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,12 @@ -## 3.2.0 - WIP +## 3.2.0 - 2018-01-25 ### Fixed -- Not #70 yet +- Fixed bug where pagination would error when querying via a map field. #70 ### Improved - Updated CraftQL support (via @markhuot) -- Updated Mapbox example to use latest API -- Improved address and lat/lng input sizing on smaller screens and in a HUD +- Removed webonyx/graphql-php dependency #71 +- Improved address and lat/lng input sizing on smaller screens and in a HUD #73 +- Updated Mapbox example to use latest API #74 ## 3.1.3 - 2017-12-18 ### Fixed diff --git a/README.md b/README.md index 0934ecf..5bc01d8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -![Simple Map](resources/banner.jpg) +![SimpleMap](resources/banner.jpg) -# Simple Map +# SimpleMap A beautifully simple Google Map field type for **Craft 3**. Full localization support, compatible with Matrix & [CraftQL](https://github.com/markhuot/craftql), supports searching by location and sorting by distance. diff --git a/src/services/MapService.php b/src/services/MapService.php index c543167..db923f4 100644 --- a/src/services/MapService.php +++ b/src/services/MapService.php @@ -287,7 +287,8 @@ public function modifyElementsQuery (ElementQueryInterface $query, $value) $this->_replaceOrderBy($query); } - if (isset($oldOrderBy)) + if (array_key_exists('oldOrderBy', get_defined_vars())) + /** @noinspection PhpUndefinedVariableInspection */ $query->orderBy = $oldOrderBy; return;