diff --git a/EntriesSubsetPlugin.php b/EntriesSubsetPlugin.php index 2adb914..3a56630 100755 --- a/EntriesSubsetPlugin.php +++ b/EntriesSubsetPlugin.php @@ -18,7 +18,7 @@ * @copyright Copyright (c) 2016 nfourtythree * @link http://n43.me * @package EntriesSubset - * @since 1.0.0 + * @since 0.5.0 */ namespace Craft; @@ -93,7 +93,7 @@ public function getReleaseFeedUrl() */ public function getVersion() { - return '0.5.0'; + return '0.5.1'; } /** diff --git a/README.md b/README.md index 9c5112c..bb494cf 100755 --- a/README.md +++ b/README.md @@ -33,6 +33,10 @@ When creating a new field the extra options for `EntryType` will appear when sel ## Entries Subset Changelog +### 0.5.1 -- 2016.03.14 + +* Initial release + ### 0.5.0 -- 2016.02.17 * Initial release diff --git a/fieldtypes/EntriesSubsetFieldType.php b/fieldtypes/EntriesSubsetFieldType.php index 8a89082..d671c16 100755 --- a/fieldtypes/EntriesSubsetFieldType.php +++ b/fieldtypes/EntriesSubsetFieldType.php @@ -8,7 +8,7 @@ * @copyright Copyright (c) 2016 nfourtythree * @link http://n43.me * @package EntriesSubset - * @since 1.0.0 + * @since 0.5.0 */ namespace Craft; @@ -70,10 +70,12 @@ public function getInputTemplateVariables($name, $criteria) $entryTypes = $this->getSettings()->entryTypes; - foreach($this->getSettings()->entryTypes as $typeId) { - if ($typeId != "*") { - $entryType = craft()->sections->getEntryTypeById($typeId); - $variables['criteria']['type'][] = $entryType->handle; + if ($entryTypes and is_array($entryTypes)) { + foreach($entryTypes as $typeId) { + if ($typeId != "*") { + $entryType = craft()->sections->getEntryTypeById($typeId); + $variables['criteria']['type'][] = $entryType->handle; + } } } diff --git a/releases.json b/releases.json index a5a2c6f..79d310c 100644 --- a/releases.json +++ b/releases.json @@ -1,4 +1,12 @@ [ + { + "version": "0.5.1", + "downloadUrl": "https://github.com/nfourtythree/entriessubset/archive/master.zip", + "date": "2016-03-14T12:00:00.111Z", + "notes": [ + "[Added] Initial release" + ] + }, { "version": "0.5.0", "downloadUrl": "https://github.com/nfourtythree/entriessubset/archive/master.zip", diff --git a/templates/fields/settings.twig b/templates/fields/settings.twig index c7623d6..65b6e8f 100644 --- a/templates/fields/settings.twig +++ b/templates/fields/settings.twig @@ -8,7 +8,7 @@ * @copyright Copyright (c) 2016 nfourtythree * @link http://n43.me * @package EntriesSubset - * @since 1.0.0 + * @since 0.5.0 */ #}