This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/client/src/components/OptionsetField/OptionField.js b/client/src/components/OptionsetField/OptionField.js | |
| index 4b0aeaa..35223df 100644 | |
| --- a/client/src/components/OptionsetField/OptionField.js | |
| +++ b/client/src/components/OptionsetField/OptionField.js | |
| @@ -68,10 +68,14 @@ class OptionField extends Component { | |
| } | |
| render() { | |
| - const labelText = this.props.leftTitle !== null | |
| + const leftTitle = this.props.leftTitle !== null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/composer.json b/composer.json | |
| index 9185afbbd..a801865e6 100644 | |
| --- a/composer.json | |
| +++ b/composer.json | |
| @@ -101,7 +101,7 @@ | |
| "thirdparty/" | |
| ], | |
| "scripts": { | |
| - "lint": "phpcs src/ tests/php/ tests/behat/src/", | |
| + "lint": "vendor/bin/phpcs src/ tests/php/ tests/behat/src/", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/tests/php/ORM/DataObjectTest.php b/tests/php/ORM/DataObjectTest.php | |
| index c0d81c1..aee0b8d 100644 | |
| --- a/tests/php/ORM/DataObjectTest.php | |
| +++ b/tests/php/ORM/DataObjectTest.php | |
| @@ -1456,6 +1456,13 @@ class DataObjectTest extends SapphireTest | |
| 'Default Value', | |
| 'Defaults are populated from overloaded populateDefaults() method' | |
| ); | |
| + | |
| + // Test populate defaults on subclasses |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/tests/model/DataObjectTest.php b/tests/model/DataObjectTest.php | |
| index e4fdb95..ea22333 100644 | |
| --- a/tests/model/DataObjectTest.php | |
| +++ b/tests/model/DataObjectTest.php | |
| @@ -1180,6 +1180,15 @@ class DataObjectTest extends SapphireTest { | |
| 'Default Value', | |
| 'Defaults are populated from overloaded populateDefaults() method' | |
| ); | |
| + | |
| + // Test populate defaults on subclasses |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/tests/model/DataObjectTest.php b/tests/model/DataObjectTest.php | |
| index e4fdb95..072dc8d 100644 | |
| --- a/tests/model/DataObjectTest.php | |
| +++ b/tests/model/DataObjectTest.php | |
| @@ -1180,6 +1180,14 @@ class DataObjectTest extends SapphireTest { | |
| 'Default Value', | |
| 'Defaults are populated from overloaded populateDefaults() method' | |
| ); | |
| + | |
| + // Test populate defaults on subclasses |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| commit 3ea3015210ca61dc451ea217f72d55444b32f2f2 | |
| Author: Sam Minnee <[email protected]> | |
| Date: Wed Oct 24 14:14:03 2018 +1300 | |
| Fix - prebuild the list of taxonomy terms by parent id | |
| diff --git a/src/Extension/GazetteTaxonomyTermExtension.php b/src/Extension/GazetteTaxonomyTermExtension.php | |
| index 291fdba..1952c6a 100644 | |
| --- a/src/Extension/GazetteTaxonomyTermExtension.php | |
| +++ b/src/Extension/GazetteTaxonomyTermExtension.php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/Extension/GazetteTaxonomyTermExtension.php b/src/Extension/GazetteTaxonomyTermExtension.php | |
| index b336631..291fdba 100644 | |
| --- a/src/Extension/GazetteTaxonomyTermExtension.php | |
| +++ b/src/Extension/GazetteTaxonomyTermExtension.php | |
| @@ -215,7 +215,7 @@ class GazetteTaxonomyTermExtension extends DataExtension | |
| if ($showTerm) { | |
| $this->getSubtreeRecursive($output, null, $this->owner, 0, $maxDepth, $prefix, $flat); | |
| } else { | |
| - $children = $this->getChildren($this->owner); | |
| + $children = $this->getCachedChildren(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/Helpers/GazetteFormHelper.php b/src/Helpers/GazetteFormHelper.php | |
| index d33c9f9..3159c46 100644 | |
| --- a/src/Helpers/GazetteFormHelper.php | |
| +++ b/src/Helpers/GazetteFormHelper.php | |
| @@ -38,9 +38,7 @@ class GazetteFormHelper | |
| public static function getSingleTaxonomyListbox($taxonomyTerm, $label, $depth = null) | |
| { | |
| // Get the parent taxonomy term and its subtree | |
| - $term = TaxonomyTerm::get()->filter([ | |
| - 'Name' => $taxonomyTerm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/Extension/GazetteTaxonomyTermExtension.php b/src/Extension/GazetteTaxonomyTermExtension.php | |
| index 2f794d7..b336631 100644 | |
| --- a/src/Extension/GazetteTaxonomyTermExtension.php | |
| +++ b/src/Extension/GazetteTaxonomyTermExtension.php | |
| @@ -2,6 +2,7 @@ | |
| namespace Education\Gazette\Extension; | |
| +use Psr\SimpleCache\CacheInterface; | |
| use SilverStripe\ORM\DataExtension; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/Helpers/GazetteFormHelper.php b/src/Helpers/GazetteFormHelper.php | |
| index d33c9f9..28927a8 100644 | |
| --- a/src/Helpers/GazetteFormHelper.php | |
| +++ b/src/Helpers/GazetteFormHelper.php | |
| @@ -105,9 +105,7 @@ class GazetteFormHelper | |
| $tree = new ArrayList(); | |
| foreach ($taxonomyTerms as $taxonomyTerm) { | |
| - $term = TaxonomyTerm::get()->filter([ | |
| - 'Name' => $taxonomyTerm |