Version 5.0.14

This commit is contained in:
Neo committed 2025-12-19 19:17:57 -08:00
1 parent 5efe744c5f
commit dbd774b30c
364 files changed
+7048 -1377

No files matched your search

+2 -2
View File
@@ -128,7 +128,7 @@ class Application extends SystemApplication
$ics = $feed->buildICalendarFeed( $calendar );
Output::i()->sendOutput( $ics, 200, 'text/calendar', [ 'Content-Disposition' => Output::getContentDisposition( 'inline', "calendarEvents.ics" ) ], FALSE, FALSE, FALSE );
Output::i()->sendOutput( $ics, 200, 'text/calendar', [ 'Content-Disposition' => Output::getContentDisposition( 'inline', "calendarEvents.ics" ) ], FALSE, FALSE, true );
}
/**
@@ -171,7 +171,7 @@ class Application extends SystemApplication
}
/* @note application/rss+xml is not a registered IANA mime-type so we need to stick with text/xml for RSS */
Output::i()->sendOutput( $document->asXML(), 200, 'text/xml' );
Output::i()->sendOutput( $document->asXML(), 200, 'text/xml', parseFileObjects: true );
}
/**
+1
View File
@@ -5,6 +5,7 @@
<module key="front/calendar"><![CDATA[{"default_controller":"view","protected":0,"default":1}]]></module>
<task frequency="P0Y0M0DT4H0M0S">icalendar</task>
<task frequency="P0Y0M0DT1H0M0S">eventreminders</task>
<task frequency="P0Y0M1DT0H0M0S">clearfeaturedevents</task>
<setting key="all_activity_calendar_streamitems"><![CDATA[{"key":"all_activity_calendar_streamitems","default":"1","report":"full"}]]></setting>
<setting key="calendar_block_past_changes"><![CDATA[{"key":"calendar_block_past_changes","default":"0","report":"full"}]]></setting>
<setting key="calendar_date_format"><![CDATA[{"key":"calendar_date_format","default":"d_lm_y","report":"full"}]]></setting>
+11 -11
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<javascript app="calendar">
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.main.js" javascript_type="controller" javascript_version="5001302" javascript_position="1000250"><![CDATA[/**
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.main.js" javascript_type="controller" javascript_version="5001403" javascript_position="1000250"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -110,7 +110,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.monthView.js" javascript_type="controller" javascript_version="5001302" javascript_position="1000250"><![CDATA[/**
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.monthView.js" javascript_type="controller" javascript_version="5001403" javascript_position="1000250"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -229,7 +229,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.eventList.js" javascript_type="controller" javascript_version="5001302" javascript_position="1000300"><![CDATA[/**
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.eventList.js" javascript_type="controller" javascript_version="5001403" javascript_position="1000300"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -347,7 +347,7 @@ var PER_PAGE = 16;
}
});
}(jQuery, _));]]></file>
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.nearMe.js" javascript_type="controller" javascript_version="5001302" javascript_position="1000300"><![CDATA[/**
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.nearMe.js" javascript_type="controller" javascript_version="5001403" javascript_position="1000300"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -711,7 +711,7 @@ var PER_PAGE = 16;
}
});
}(jQuery, _));]]></file>
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.search.js" javascript_type="controller" javascript_version="5001302" javascript_position="1000300"><![CDATA[/**
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.search.js" javascript_type="controller" javascript_version="5001403" javascript_position="1000300"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -1265,7 +1265,7 @@ var PER_PAGE = 16;
});
}(jQuery, _));
]]></file>
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.dates.js" javascript_type="controller" javascript_version="5001302" javascript_position="1000100"><![CDATA[/**
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.dates.js" javascript_type="controller" javascript_version="5001403" javascript_position="1000100"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -1787,7 +1787,7 @@ var PER_PAGE = 16;
}
});
}(jQuery, _));]]></file>
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/venue" javascript_name="ips.venue.main.js" javascript_type="controller" javascript_version="5001302" javascript_position="1000200"><![CDATA[/**
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/venue" javascript_name="ips.venue.main.js" javascript_type="controller" javascript_version="5001403" javascript_position="1000200"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -1894,7 +1894,7 @@ var PER_PAGE = 16;
}
});
}(jQuery, _));]]></file>
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderButton.js" javascript_type="controller" javascript_version="5001302" javascript_position="1000150"><![CDATA[/**
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderButton.js" javascript_type="controller" javascript_version="5001403" javascript_position="1000150"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -1977,7 +1977,7 @@ var PER_PAGE = 16;
}
});
}(jQuery, _));]]></file>
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderForm.js" javascript_type="controller" javascript_version="5001302" javascript_position="1000150">/**
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderForm.js" javascript_type="controller" javascript_version="5001403" javascript_position="1000150">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -2087,7 +2087,7 @@ var PER_PAGE = 16;
});
}(jQuery, _));
</file>
<file javascript_app="calendar" javascript_location="front" javascript_path="templates" javascript_name="ips.calendar.templates.js" javascript_type="framework" javascript_version="5001302" javascript_position="1000050"><![CDATA[/**
<file javascript_app="calendar" javascript_location="front" javascript_path="templates" javascript_name="ips.calendar.templates.js" javascript_type="framework" javascript_version="5001403" javascript_position="1000050"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*/
@@ -2096,7 +2096,7 @@ var PER_PAGE = 16;
ips.templates.set('calendar.reminder.loading', " \
<div class='ipsLoading ipsLoading--tiny'></div>\
");]]></file>
<file javascript_app="calendar" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.overview.js" javascript_type="template" javascript_version="5001302" javascript_position="1000050"><![CDATA[ips.templates.set("eventLoading", `
<file javascript_app="calendar" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.overview.js" javascript_type="template" javascript_version="5001403" javascript_position="1000050"><![CDATA[ips.templates.set("eventLoading", `
<li class='ipsData__item ipsData__item--loading'>
<div class="ipsData__image" aria-hidden="true"></div>
<div class="ipsData__content">
+4 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<language>
<app key="calendar" version="5001302">
<app key="calendar" version="5001403">
<word key="__app_calendar" js="0">Events</word>
<word key="frontnavigation_calendar" js="0">Events</word>
<word key="__indefart_calendar_event_comment" js="0">a comment on an event</word>
@@ -89,6 +89,9 @@
<word key="cal_allow_comments" js="0">Allow comments?</word>
<word key="cal_allow_reviews" js="0">Allow reviews?</word>
<word key="cal_review_moderate" js="0">Reviews must be approved?</word>
<word key="cal_allow_recurring" js="0">Allow recurring events?</word>
<word key="cal_show_overview" js="0">Include in Overview</word>
<word key="cal_show_overview_desc" js="0"><![CDATA[When disabled, events in this calendar will be excluded from the <a href='{internal.front.app=calendar&module=calendar&controller=view&view=overview}' target='_blank'>events landing page</a>.<br>Featured events will always be displayed in the overview.]]></word>
<word key="calperm_perm__label" js="0"></word>
<word key="calperm_perm__view" js="0">See Calendar</word>
<word key="calperm_perm__read" js="0">View Events</word>
+1 -1
View File
@@ -1 +1 @@
{"icalendar":"P0Y0M0DT4H0M0S","eventreminders":"P0Y0M0DT1H0M0S"}
{"icalendar":"P0Y0M0DT4H0M0S","eventreminders":"P0Y0M0DT1H0M0S","clearfeaturedevents":"P0Y0M1DT0H0M0S"}
+5
View File
@@ -1549,6 +1549,7 @@
</label>
</div>
</div>
{{if $value['allow_recurring']}}
<div class='i-padding_3 i-background_2'>
<strong class='i-color_hard i-font-weight_600 i-font-size_3 i-margin-bottom_2 i-display_block'><i class="fa-solid fa-clipboard-list i-color_soft i-margin-end_icon i-opacity_5"></i> {lang="submit_event_summary"}</strong>
<p><span data-role='dateSummary'></span></p>
@@ -1623,6 +1624,10 @@
</i-dropdown>
</div>
</div>
{{else}}
<input type='hidden' name='event_dates[event_repeat]' value='0'>
<input type='hidden' name='event_dates[repeat_end]' value='never'>
{{endif}}
</div>
</div>]]></template>
<template template_group="submit" template_name="submitForm" template_data="$id, $action, $elements, $hiddenValues, $actionButtons, $uploadField, $class=''" template_location="front" template_app="calendar"><![CDATA[
+18 -1
View File
@@ -275,6 +275,19 @@
"107799": "4.7.20 Beta 5",
"107800": "4.7.20",
"107801": "4.7.20",
"107802": "4.7.20",
"107803": "4.7.20",
"107810": "4.7.21 Beta 1",
"107811": "4.7.21",
"107815": "4.7.22 Beta 1",
"107816": "4.7.22 Beta 2",
"107817": "4.7.22",
"107818": "4.7.22",
"107819": "4.7.22",
"107820": "4.7.22",
"107826": "4.7.23 Beta 1",
"107827": "4.7.23",
"107828": "4.7.23",
"500001": "5.0.0 Alpha 1",
"500002": "5.0.0 Alpha 2",
"5000003": "5.0.0 Alpha 3",
@@ -397,5 +410,9 @@
"5001204": "5.0.12",
"5001300": "5.0.13 Beta 1",
"5001301": "5.0.13 Beta 2",
"5001302": "5.0.13"
"5001302": "5.0.13",
"5001400": "5.0.14 Beta 1",
"5001401": "5.0.14 Beta 1",
"5001402": "5.0.14 Beta 2",
"5001403": "5.0.14"
}
@@ -553,6 +553,12 @@ class view extends Controller
);
}
/* Featured events use all calendars, but the other areas don't,
so let's filter down the list based on the bitoption */
$calendars = array_filter( $calendars, function( $calendar ) {
return !$calendar->calendar_bitoptions['bw_hide_overview'];
});
/* Events near me */
if( isset( Request::i()->lat ) and isset( Request::i()->lon ) )
{
@@ -0,0 +1,23 @@
{
"id": 107802,
"name": "4.7.20",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,23 @@
{
"id": 107803,
"name": "4.7.20",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,23 @@
{
"id": 107810,
"name": "4.7.21 Beta 1",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,23 @@
{
"id": 107811,
"name": "4.7.21",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,23 @@
{
"id": 107815,
"name": "4.7.22 Beta 1",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,23 @@
{
"id": 107816,
"name": "4.7.22 Beta 2",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,23 @@
{
"id": 107817,
"name": "4.7.22",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,23 @@
{
"id": 107818,
"name": "4.7.22",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,23 @@
{
"id": 107819,
"name": "4.7.22",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,23 @@
{
"id": 107820,
"name": "4.7.22",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,23 @@
{
"id": 107826,
"name": "4.7.23 Beta 1",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,23 @@
{
"id": 107827,
"name": "4.7.23",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,23 @@
{
"id": 107828,
"name": "4.7.23",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,22 @@
{
"id": 5001400,
"name": "5.0.14 Beta 1",
"steps": {
"queries": false,
"lang": true,
"theme": true,
"themeeditor": false,
"javascript": false,
"emailTemplates": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": true,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,16 @@
{
"normal": {
"added": [
"cal_allow_recurring",
"cal_show_overview",
"cal_show_overview_desc"
],
"edited": [],
"removed": []
},
"js": {
"added": [],
"edited": [],
"removed": []
}
}
@@ -0,0 +1,7 @@
{
"added": [
"clearfeaturedevents"
],
"edited": [],
"removed": []
}
@@ -0,0 +1,19 @@
{
"html": {
"added": [],
"edited": [
"front\/submit\/datesForm"
],
"removed": []
},
"css": {
"added": [],
"edited": [],
"removed": []
},
"resources": {
"added": [],
"edited": [],
"removed": []
}
}
@@ -0,0 +1,22 @@
{
"id": 5001401,
"name": "5.0.14 Beta 1",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeeditor": false,
"javascript": false,
"emailTemplates": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,22 @@
{
"id": 5001402,
"name": "5.0.14 Beta 2",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeeditor": false,
"javascript": false,
"emailTemplates": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,22 @@
{
"id": 5001403,
"name": "5.0.14",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeeditor": false,
"javascript": false,
"emailTemplates": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -145,7 +145,9 @@ class Calendar extends Model implements Permissions
'calendar_bitoptions' => array(
'calendar_bitoptions' => array(
'bw_disable_tagging' => 1,
'bw_disable_prefixes' => 2
'bw_disable_prefixes' => 2,
'bw_disable_recurring' => 4,
'bw_hide_overview' => 8
)
)
);
@@ -239,6 +241,8 @@ class Calendar extends Model implements Permissions
$form->add( new YesNo( 'cal_allow_reviews', $this->id ? $this->allow_reviews : FALSE, FALSE, array( 'togglesOn' => array( 'cal_review_moderate' ) ) ) );
$form->add( new YesNo( 'cal_review_moderate', $this->id ? $this->review_moderate : FALSE, FALSE, array(), NULL, NULL, NULL, 'cal_review_moderate' ) );
$form->add( new YesNo( 'cal_allow_anonymous', $this->id ? $this->allow_anonymous : FALSE, FALSE, array(), NULL, NULL, NULL, 'cal_allow_anonymous' ) );
$form->add( new YesNo( 'cal_allow_recurring', $this->id ? !$this->calendar_bitoptions['bw_disable_recurring'] : true, false ) );
$form->add( new YesNo( 'cal_show_overview', $this->id ? !$this->calendar_bitoptions['bw_hide_overview'] : true, false ) );
parent::form( $form );
}
@@ -264,6 +268,13 @@ class Calendar extends Model implements Permissions
unset( $values['cal_title'] );
}
/* These are reversed because we want to default to previous behavior, which means that the bit options would be turned OFF.
However, to the end-user it makes more sense to disable it as opposed to enable */
$values['calendar_bitoptions']['bw_disable_recurring'] = !$values['cal_allow_recurring'];
$values['calendar_bitoptions']['bw_hide_overview'] = !$values['cal_show_overview'];
unset( $values['cal_allow_recurring'] );
unset( $values['cal_show_overview'] );
return $values;
}
+50 -38
View File
@@ -1446,6 +1446,7 @@ class Event extends Item implements Embeddable,
'event_repeat_freq' => NULL, /* Repeat every 1 day, 2 days, 3 days, etc. */
'repeat_end_occurrences' => NULL, /* Ends after x occurrences */
'repeat_end_date' => NULL, /* Ends on x date (which is separate from the event end date - e.g. jan 9 2014 3pm to jan 10 2014 3pm, repeat annually until jan 9 2019) */
'allow_recurring' => ( !$container->calendar_bitoptions['bw_disable_recurring'] )
);
/* If we're copying an event, reset the date & time fields */
@@ -1463,7 +1464,7 @@ class Event extends Item implements Embeddable,
}
/* Figure out the recurrence data if we are editing */
if ( $item AND $item->recurring )
if ( $item AND $item->recurring AND $dateValues['allow_recurring'] )
{
try
{
@@ -1768,6 +1769,13 @@ class Event extends Item implements Embeddable,
$this->start_date = Date::createFromForm( $values['event_dates']['start_date'], ( ( !isset( $values['event_dates']['all_day'] ) OR !$values['event_dates']['all_day'] ) ? $values['event_dates']['start_time'] : '' ), ( isset( $values['event_dates']['all_day'] ) AND $values['event_dates']['all_day'] ) ? 'UTC' : $values['event_dates']['event_timezone'] )->format( 'Y-m-d H:i' );
$this->end_date = null;
/* If the calendar does not allow recurring events, force the settings */
if( $this->container()->calendar_bitoptions['bw_disable_recurring'] )
{
$values['event_dates']['repeat_end'] = 'never';
$values['event_dates']['event_repeat'] = 0;
}
/* Clear clear fields for non-selected items */
switch( $values['event_dates']['repeat_end'] )
{
@@ -2279,57 +2287,61 @@ class Event extends Item implements Embeddable,
$formattedEvents = iterator_to_array( $events );
}
/* Now get the recurring events.... */
$recurringEvents = Event::getItemsWithPermission( array_merge( $where, array( array( "event_recurring IS NOT NULL AND (event_recurring_end_date IS NULL OR DATE(event_recurring_end_date) >= '{$startDate->mysqlDatetime( FALSE )}')" ) ) ), 'event_start_date ASC', NULL, ( $skipPermissions === TRUE ) ? NULL : 'view', ( $skipPermissions === TRUE ) ? Filter::FILTER_SHOW_HIDDEN : Filter::FILTER_AUTOMATIC, 0, $member, FALSE, FALSE, FALSE,FALSE, NULL, FALSE, TRUE, TRUE, TRUE, FALSE, $location );
/* Loop over any results */
foreach( $recurringEvents as $event )
/* Now get the recurring events....
If we only have one calendar, and it does not allow recurring events, we can skip this extra query */
if( !( $calendar instanceof Calendar ) or !$calendar->calendar_bitoptions['bw_disable_recurring'] )
{
/* @var Event $event */
/* Find occurrences within our date range (if any) */
$thisEndDate = ( $endDate ? $endDate->setTime( 23, 59, 59 ) : $startDate->adjust( "+2 years" ) )->setTime( 23, 59, 59 );
$thisEndDate = ( clone $thisEndDate )->adjust( "+1 day" );
$occurrences = $event->findOccurrences( $startDate, $thisEndDate );
$recurringEvents = Event::getItemsWithPermission( array_merge( $where, array( array( "event_recurring IS NOT NULL AND (event_recurring_end_date IS NULL OR DATE(event_recurring_end_date) >= '{$startDate->mysqlDatetime( FALSE )}')" ) ) ), 'event_start_date ASC', NULL, ( $skipPermissions === TRUE ) ? NULL : 'view', ( $skipPermissions === TRUE ) ? Filter::FILTER_SHOW_HIDDEN : Filter::FILTER_AUTOMATIC, 0, $member, FALSE, FALSE, FALSE,FALSE, NULL, FALSE, TRUE, TRUE, TRUE, FALSE, $location );
/* Do we have any? */
if ( count( $occurrences ) )
/* Loop over any results */
foreach( $recurringEvents as $event )
{
/* Are we formatting events? If so, place into the array as appropriate. */
if ( $formatEvents )
/* @var Event $event */
/* Find occurrences within our date range (if any) */
$thisEndDate = ( $endDate ? $endDate->setTime( 23, 59, 59 ) : $startDate->adjust( "+2 years" ) )->setTime( 23, 59, 59 );
$thisEndDate = ( clone $thisEndDate )->adjust( "+1 day" );
$occurrences = $event->findOccurrences( $startDate, $thisEndDate );
/* Do we have any? */
if ( count( $occurrences ) )
{
foreach( $occurrences as $occurrence )
/* Are we formatting events? If so, place into the array as appropriate. */
if ( $formatEvents )
{
/* Is this a ranged repeating event? */
if ( $occurrence['endDate'] !== NULL )
foreach( $occurrences as $occurrence )
{
$date = $occurrence['startDate'];
$eDate = ( $thisEndDate->mysqlDatetime( FALSE ) < $occurrence['endDate']->mysqlDatetime( FALSE ) ) ? $thisEndDate : $occurrence['endDate'];
if ( $date->mysqlDatetime( FALSE ) < $eDate->mysqlDatetime( FALSE ) )
/* Is this a ranged repeating event? */
if ( $occurrence['endDate'] !== NULL )
{
while( $date->mysqlDatetime( FALSE ) < $eDate->mysqlDatetime( FALSE ) )
{
$formattedEvents[ $date->mysqlDatetime( FALSE ) ]['ranged'][ $event->id ] = $event;
$date = $date->adjust( '+1 day' );
}
$date = $occurrence['startDate'];
$eDate = ( $thisEndDate->mysqlDatetime( FALSE ) < $occurrence['endDate']->mysqlDatetime( FALSE ) ) ? $thisEndDate : $occurrence['endDate'];
$formattedEvents[ $eDate->mysqlDatetime( FALSE ) ]['ranged'][ $event->id ] = $event;
if ( $date->mysqlDatetime( FALSE ) < $eDate->mysqlDatetime( FALSE ) )
{
while( $date->mysqlDatetime( FALSE ) < $eDate->mysqlDatetime( FALSE ) )
{
$formattedEvents[ $date->mysqlDatetime( FALSE ) ]['ranged'][ $event->id ] = $event;
$date = $date->adjust( '+1 day' );
}
$formattedEvents[ $eDate->mysqlDatetime( FALSE ) ]['ranged'][ $event->id ] = $event;
}
else
{
$formattedEvents[ $date->mysqlDatetime( FALSE ) ]['single'][ $event->id ] = $event;
}
}
else
{
$formattedEvents[ $date->mysqlDatetime( FALSE ) ]['single'][ $event->id ] = $event;
$formattedEvents[ $occurrence['startDate']->mysqlDatetime( FALSE ) ]['single'][ $event->id ] = $event;
}
}
else
{
$formattedEvents[ $occurrence['startDate']->mysqlDatetime( FALSE ) ]['single'][ $event->id ] = $event;
}
}
}
/* Otherwise we only want one instance of the event in our final array */
else
{
$formattedEvents[] = $event;
/* Otherwise we only want one instance of the event in our final array */
else
{
$formattedEvents[] = $event;
}
}
}
}
@@ -400,6 +400,12 @@ class ICSParser
{
break;
}
/* If recurring is blocked on this calendar, disable it */
if( !$calendar->calendar_bitoptions['bw_disable_recurring'] and isset( $event['recurr'] ) )
{
unset( $event['recurr'] );
}
/* Quickly, if we don't support the recurrence data provided let's just skip this event */
if( isset( $event['recurr'] ) )
@@ -0,0 +1,72 @@
<?php
/**
* @brief clearfeaturedevents Task
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
{subpackage}
* @since 03 Nov 2025
*/
namespace IPS\calendar\tasks;
use IPS\calendar\Event;
use IPS\Task;
use IPS\Task\Exception as TaskException;
use function defined;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* clearfeaturedevents Task
*/
class clearfeaturedevents extends Task
{
/**
* Execute
*
* If ran successfully, should return anything worth logging. Only log something
* worth mentioning (don't log "task ran successfully"). Return NULL (actual NULL, not '' or 0) to not log (which will be most cases).
* If an error occurs which means the task could not finish running, throw an \IPS\Task\Exception - do not log an error as a normal log.
* Tasks should execute within the time of a normal HTTP request.
*
* @return mixed Message to log or NULL
* @throws TaskException
*/
public function execute() : mixed
{
$log = "";
$featured = iterator_to_array( Event::featured( null ) );
foreach( $featured as $event )
{
/* @var Event $event */
if( $event->hasPassed() )
{
$event->setFeatured( false );
$log .= "Unfeatured event {$event->id}; ";
}
}
return $log ?: null;
}
/**
* Cleanup
*
* If your task takes longer than 15 minutes to run, this method
* will be called before execute(). Use it to clean up anything which
* may not have been done
*
* @return void
*/
public function cleanup() : void
{
}
}