Skip to content

Commit

Permalink
v2.0.21
Browse files Browse the repository at this point in the history
  • Loading branch information
kjmartens committed Jul 26, 2019
1 parent a064d93 commit 9132e40
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 27 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Solspace Calendar Changelog

## 2.0.21 - 2019-07-26
### Changed
- Updated `carbon` dependency to `^1.22.1|^2.19` for better compatibility with other plugins, and to reduce the chances of seeing deprecation notice.
- Updated event fetching to prevent from crashing when events have invalid dates.

### Fixed
- Fixed a bug in the database relation for the Calendar record.
- Fixed a bug where the developer event names were wrong for the Calendars and Events service files.

## 2.0.20 - 2019-05-14
### Changed
- Updated plugin icon.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ The most reliable and powerful event management plugin for Craft. Set up beautif
Calendar is the most reliable and powerful event management and calendaring plugin on the market for Craft CMS. The intuitive interface allows you to create events with complex recurring event rules and exclusions, while the flexible templating offers a variety of options to satisfy your calendaring needs. Stop wasting valuable development hours wrestling with and tuning Craft Entries or other alternatives. You can trust Calendar (and the team behind it) to deliver the quality and support you expect and deserve.

## Documentation
Full documentation for Calendar can be found on the [Solspace documentation website](http://docs.solspace.com/craft/calendar/v2/).
Full documentation for Calendar can be found on the [Solspace documentation website](https://docs.solspace.com/craft/calendar/v2/).
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "solspace/craft3-calendar",
"description": "The most powerful event management plugin for Craft.",
"version": "2.0.20",
"version": "2.0.21",
"type": "craft-plugin",
"authors": [
{
"name": "Solspace",
"homepage": "https://solspace.com/"
"homepage": "https://docs.solspace.com"
}
],
"require": {
Expand All @@ -17,7 +17,7 @@
"symfony/finder": "^2.8|^3.0|^4.0",
"symfony/filesystem": "^2.8|^3.0|^4.0",
"solspace/craft3-commons": "^1.0.17",
"nesbot/carbon": "^1.22.1"
"nesbot/carbon": "^1.22.1|^2.19"
},
"autoload": {
"psr-4": {
Expand All @@ -30,8 +30,8 @@
"class": "Solspace\\Calendar\\Calendar",
"name": "Calendar",
"developer": "Solspace",
"developerUrl": "http://docs.solspace.com/craft/calendar/v2/",
"documentationUrl": "http://docs.solspace.com/craft/calendar/v2/",
"developerUrl": "https://docs.solspace.com/craft/calendar/v2/",
"documentationUrl": "https://docs.solspace.com/craft/calendar/v2/",
"changelogUrl": "https://raw.githubusercontent.com/solspace/craft3-calendar/master/CHANGELOG.md",
"hasSettings": true,
"hasCpSection": true
Expand Down
2 changes: 1 addition & 1 deletion src/Calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class Calendar extends Plugin
const PERMISSION_EVENTS_FOR_ALL = 'calendar-manageEventsFor:all';
const PERMISSION_SETTINGS = 'calendar-settings';

const PERMISSIONS_HELP_LINK = 'https://solspace.com/craft/calendar/docs/demo-templates';
const PERMISSIONS_HELP_LINK = 'https://docs.solspace.com/craft/calendar/v2/setup/demo-templates.html';

/** @var array */
private static $javascriptTranslationKeys = [
Expand Down
6 changes: 5 additions & 1 deletion src/Elements/Db/EventQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Solspace\Calendar\Calendar;
use Solspace\Calendar\Elements\Event;
use Solspace\Calendar\Library\DateHelper;
use Solspace\Calendar\Library\Exceptions\CalendarException;
use Solspace\Calendar\Library\RecurrenceHelper;
use Solspace\Calendar\Records\CalendarRecord;
use Solspace\Calendar\Services\EventsService;
Expand Down Expand Up @@ -1174,7 +1175,10 @@ function ($data) {
*/
private function storeEventOnDate(Event $event, Carbon $date)
{
$this->events[] = $event->cloneForDate($date);
try {
$this->events[] = $event->cloneForDate($date);
} catch (CalendarException $e) {
}
}

/**
Expand Down
5 changes: 4 additions & 1 deletion src/Elements/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,10 @@ public function getOccurrences(array $config = null): array
break;
}

$occurrences[] = $this->cloneForDate($date);
try {
$occurrences[] = $this->cloneForDate($date);
} catch (CalendarException $e) {
}
}

$this->occurrenceCache[$configHash] = $occurrences;
Expand Down
2 changes: 1 addition & 1 deletion src/Records/CalendarRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ public static function tableName(): string
*/
public function getFieldLayout()
{
return $this->hasOne(FieldLayout::class, ['fieldLayoutId' => 'id']);
return $this->hasOne(FieldLayout::class, ['id' => 'fieldLayoutId']);
}
}
4 changes: 2 additions & 2 deletions src/Services/CalendarsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
class CalendarsService extends Component
{
const EVENT_BEFORE_SAVE = 'beforeSave';
const EVENT_AFTER_SAVE = 'beforeSave';
const EVENT_AFTER_SAVE = 'afterSave';
const EVENT_BEFORE_DELETE = 'beforeDelete';
const EVENT_AFTER_DELETE = 'beforeDelete';
const EVENT_AFTER_DELETE = 'afterDelete';

/** @var CalendarModel[] */
private $calendarCache;
Expand Down
4 changes: 2 additions & 2 deletions src/Services/EventsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
class EventsService extends Component
{
const EVENT_BEFORE_SAVE = 'beforeSave';
const EVENT_AFTER_SAVE = 'beforeSave';
const EVENT_AFTER_SAVE = 'afterSave';
const EVENT_BEFORE_DELETE = 'beforeDelete';
const EVENT_AFTER_DELETE = 'beforeDelete';
const EVENT_AFTER_DELETE = 'afterDelete';

/**
* Returns an event by its ID.
Expand Down
27 changes: 19 additions & 8 deletions src/codepack/assets/images/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/codepack/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"package_desc": "This package includes a set of sample templates that help demonstrate Calendar's abilities and get you better acquainted with it.",
"package_version": "1.0.0",
"vendor": "Solspace, Inc.",
"vendor_url": "https://solspace.com/craft",
"docs_url": "https://solspace.com/craft/calendar/docs"
"vendor_url": "https://docs.solspace.com",
"docs_url": "https://docs.solspace.com/craft/calendar/v2/"
}
6 changes: 3 additions & 3 deletions src/codepack/templates/layouts/_header.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
Resources
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="https://solspace.com/craft/calendar/">Calendar</a>
<a class="dropdown-item" href="https://solspace.com/craft/calendar/docs">Documentation</a>
<a class="dropdown-item" href="https://solspace.com/craft/calendar/support">Support</a>
<a class="dropdown-item" href="https://docs.solspace.com/craft/calendar/v2/">Calendar</a>
<a class="dropdown-item" href="https://docs.solspace.com/craft/calendar/v2/">Documentation</a>
<a class="dropdown-item" href="https://docs.solspace.com/craft/calendar/v2/support.html">Support</a>
</div>
</div>
</div>
Expand Down

0 comments on commit 9132e40

Please sign in to comment.