Skip to content

Commit

Permalink
Fix a ? b : c ? d : e deprecation warning
Browse files Browse the repository at this point in the history
Fixes #3
  • Loading branch information
Tam committed Dec 1, 2020
1 parent ec27295 commit cd53dce
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.4 - 2020-12-01
### Fixed
- Fix `a ? b : c ? d : e` deprecation warning (Fixes #3)

## 1.0.3 - 2020-11-20
### Added
- Add more granular notes add/delete permissions (Closes #1)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ether/notes",
"description": "A note taking field type for Craft CMS 3",
"version": "1.0.3",
"version": "1.0.4",
"type": "craft-plugin",
"license": "proprietary",
"minimum-stability": "dev",
Expand Down
4 changes: 2 additions & 2 deletions src/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ private function _canDelete ()
case self::DELETE_PERMISSION:
return $user->checkPermission('deleteAllNotes')
? true
: $user->checkPermission('deleteOwnNotes')
: ($user->checkPermission('deleteOwnNotes')
? 'own'
: false;
: false);
case self::DELETE_NONE:
return false;
default:
Expand Down

0 comments on commit cd53dce

Please sign in to comment.