Version 4.0.13.1

This commit is contained in:
Neo committed 2025-12-19 04:57:54 -08:00
1 parent f9e857d255
commit c6a86f0d9b
7517 files changed
+597400 -668041

No files matched your search

Whitespace-only changes.
@@ -0,0 +1,909 @@
{
"1": {
"method": "renameTable",
"params": [
"cal_calendars",
"calendar_calendars"
]
},
"2": {
"method": "renameTable",
"params": [
"cal_event_comments",
"calendar_event_comments"
]
},
"3": {
"method": "renameTable",
"params": [
"cal_event_rsvp",
"calendar_event_rsvp"
]
},
"4": {
"method": "dropTable",
"params": [
"calendar_events",
true
]
},
"5": {
"method": "renameTable",
"params": [
"cal_events",
"calendar_events"
]
},
"6": {
"method": "renameTable",
"params": [
"cal_import_feeds",
"calendar_import_feeds"
]
},
"7": {
"method": "renameTable",
"params": [
"cal_import_map",
"calendar_import_map"
]
},
"8": {
"method": "dropIndex",
"params": [
"calendar_events",
"event_content"
]
},
"9": {
"method": "dropIndex",
"params": [
"calendar_events",
"event_title"
]
},
"10": {
"method": "dropIndex",
"params": [
"calendar_event_comments",
"comment_text"
]
},
"11": {
"method": "dropColumn",
"params": [
"calendar_calendars",
[
"cal_rss_cache",
"cal_rss_update",
"cal_rss_export",
"cal_rss_export_days",
"cal_rss_update_last",
"cal_rss_export_max",
"cal_rsvp_owner",
"cal_bday_limit",
"cal_event_limit"
]
]
},
"12": {
"method": "dropColumn",
"params": [
"calendar_import_feeds",
"feed_recache_freq"
]
},
"13": {
"method": "addColumn",
"params": [
"calendar_calendars",
{
"name": "cal_color",
"type": "VARCHAR",
"length": 7,
"decimals": null,
"values": [],
"allow_null": true,
"default": null,
"comment": "Hex color code to represent this calendar",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"14": {
"method": "update",
"params": [
"calendar_calendars",
"cal_color='#000000'"
]
},
"15": {
"method": "changeColumn",
"params": [
"calendar_event_comments",
"ip_address",
{
"name": "comment_ip_address",
"type": "VARCHAR",
"length": 46,
"decimals": null,
"values": [],
"allow_null": true,
"default": null,
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"16": {
"method": "addColumn",
"params": [
"calendar_events",
{
"name": "event_reviews",
"type": "INT",
"length": null,
"decimals": null,
"values": [],
"allow_null": false,
"default": "0",
"comment": "",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"17": {
"method": "dropColumn",
"params": [
"calendar_events",
[
"event_smilies",
"event_rating_hits",
"event_rating_total",
"event_attachments"
]
]
},
"18": {
"method": "addColumn",
"params": [
"calendar_events",
{
"name": "event_ip_address",
"type": "VARCHAR",
"length": 46,
"decimals": null,
"values": [],
"allow_null": true,
"default": null,
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"19": {
"method": "addColumn",
"params": [
"calendar_events",
{
"name": "event_locked",
"type": "TINYINT",
"length": 1,
"decimals": null,
"values": [],
"allow_null": false,
"default": "0",
"comment": "Whether the event is locked (for new comments\/reviews) or not",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"20": {
"method": "addColumn",
"params": [
"calendar_events",
{
"name": "event_featured",
"type": "TINYINT",
"length": 1,
"decimals": null,
"values": [],
"allow_null": false,
"default": "0",
"comment": "Whether the event is featured or not",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"21": {
"method": "changeColumn",
"params": [
"calendar_events",
"event_rating_avg",
{
"name": "event_rating",
"type": "SMALLINT",
"length": 5,
"decimals": null,
"values": [],
"allow_null": false,
"default": "0",
"comment": "",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"22": {
"method": "addColumn",
"params": [
"calendar_events",
{
"name": "event_last_comment",
"type": "INT",
"length": 11,
"decimals": null,
"values": [],
"allow_null": true,
"default": null,
"comment": "",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"23": {
"method": "addColumn",
"params": [
"calendar_events",
{
"name": "event_last_review",
"type": "INT",
"length": 11,
"decimals": null,
"values": [],
"allow_null": true,
"default": null,
"comment": "",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"24": {
"method": "addColumn",
"params": [
"calendar_events",
{
"name": "event_approved_by",
"type": "BIGINT",
"length": 0,
"decimals": null,
"values": [],
"allow_null": true,
"default": null,
"comment": "Member ID who approved the event",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"25": {
"method": "addColumn",
"params": [
"calendar_events",
{
"name": "event_approved_on",
"type": "INT",
"length": 11,
"decimals": null,
"values": [],
"allow_null": true,
"default": null,
"comment": "Date the event was approved on",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"26": {
"method": "dropTable",
"params": [
"cal_event_ratings",
true
]
},
"27": {
"method": "addColumn",
"params": [
"calendar_calendars",
{
"name": "cal_allow_comments",
"type": "TINYINT",
"length": 1,
"decimals": null,
"values": [],
"allow_null": false,
"default": "1",
"comment": "",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"28": {
"method": "addColumn",
"params": [
"calendar_calendars",
{
"name": "cal_allow_reviews",
"type": "TINYINT",
"length": 1,
"decimals": null,
"values": [],
"allow_null": false,
"default": "0",
"comment": "",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"29": {
"method": "addColumn",
"params": [
"calendar_calendars",
{
"name": "cal_review_moderate",
"type": "TINYINT",
"length": 1,
"decimals": null,
"values": [],
"allow_null": false,
"default": "0",
"comment": "",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"30": {
"method": "addColumn",
"params": [
"calendar_events",
{
"name": "event_location",
"type": "TEXT",
"length": null,
"decimals": null,
"values": [],
"allow_null": true,
"default": null,
"comment": "Stores location data for the event, used to create a map",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"31": {
"method": "addColumn",
"params": [
"calendar_import_feeds",
{
"name": "feed_allow_rsvp",
"type": "TINYINT",
"length": 1,
"decimals": null,
"values": [],
"allow_null": false,
"default": "0",
"comment": "",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"32": {
"method": "addColumn",
"params": [
"calendar_events",
{
"name": "event_rsvp_limit",
"type": "INT",
"length": 10,
"decimals": null,
"values": [],
"allow_null": true,
"default": null,
"comment": "Maximum number of attendees allowed for the event",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"33": {
"method": "addColumn",
"params": [
"calendar_events",
{
"name": "event_cover_photo",
"type": "VARCHAR",
"length": 255,
"decimals": null,
"values": [],
"allow_null": true,
"default": null,
"comment": "Header background image for the event",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"34": {
"method": "addColumn",
"params": [
"calendar_event_rsvp",
{
"name": "rsvp_response",
"type": "TINYINT",
"length": null,
"decimals": null,
"values": [],
"allow_null": false,
"default": "0",
"comment": "0=No, 1=Yes, 2=Maybe",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"35": {
"method": "update",
"params": [
"calendar_event_rsvp",
"rsvp_response=1"
]
},
"36": {
"method": "changeColumn",
"params": [
"calendar_events",
"event_recurring",
{
"name": "event_recurring",
"type": "TEXT",
"length": 2,
"decimals": null,
"values": [],
"allow_null": true,
"default": "0",
"comment": "Holds an RRULE value to indicate how the event recurs",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"37": {
"method": "changeColumn",
"params": [
"calendar_events",
"event_end_date",
{
"name": "event_end_date",
"type": "DATETIME",
"length": 0,
"decimals": null,
"values": [],
"allow_null": true,
"default": "0000-00-00 00:00:00",
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"38": {
"method": "changeColumn",
"params": [
"calendar_import_feeds",
"feed_next_run",
{
"name": "feed_last_run",
"type": "INT",
"length": 11,
"decimals": null,
"values": [],
"allow_null": false,
"default": "0",
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"39": {
"method": "changeIndex",
"params": [
"calendar_import_feeds",
"feed_next_run",
{
"type": "key",
"name": "feed_last_run",
"columns": [
"feed_last_run"
],
"length": [
null
]
}
]
},
"40": {
"method": "addColumn",
"params": [
"calendar_events",
{
"name": "event_album",
"type": "MEDIUMINT",
"length": null,
"decimals": null,
"values": [],
"allow_null": true,
"default": null,
"comment": "Holds album ID associated with this event",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"41": {
"method": "createTable",
"params": [
{
"name": "calendar_event_reviews",
"columns": {
"review_id": {
"allow_null": false,
"auto_increment": true,
"binary": false,
"comment": "ID Number",
"decimals": null,
"default": null,
"length": 20,
"name": "review_id",
"type": "BIGINT",
"unsigned": true,
"values": [],
"zerofill": false
},
"review_eid": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "The event ID",
"decimals": null,
"default": "0",
"length": 10,
"name": "review_eid",
"type": "INT",
"unsigned": true,
"values": [],
"zerofill": false
},
"review_mid": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "The member ID of the review author",
"decimals": null,
"default": "0",
"length": 8,
"name": "review_mid",
"type": "MEDIUMINT",
"unsigned": true,
"values": [],
"zerofill": false
},
"review_text": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "The review contents",
"decimals": null,
"default": null,
"length": 0,
"name": "review_text",
"type": "MEDIUMTEXT",
"unsigned": false,
"values": [],
"zerofill": false
},
"review_append_edit": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "Boolean indicating if edit message should show",
"decimals": null,
"default": "0",
"length": 1,
"name": "review_append_edit",
"type": "TINYINT",
"unsigned": true,
"values": [],
"zerofill": false
},
"review_edit_time": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "Unix timestamp of when the review was last edited",
"decimals": null,
"default": null,
"length": 10,
"name": "review_edit_time",
"type": "INT",
"unsigned": true,
"values": [],
"zerofill": false
},
"review_edit_name": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "Username of user who last edited review",
"decimals": null,
"default": null,
"length": 255,
"name": "review_edit_name",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"review_date": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "Unix timestamp of when review was made",
"decimals": null,
"default": null,
"length": 10,
"name": "review_date",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"review_ip": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "IP address review was made from",
"decimals": null,
"default": "",
"length": 46,
"name": "review_ip",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"review_author_name": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "Username of user who made review",
"decimals": null,
"default": "",
"length": 255,
"name": "review_author_name",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"review_rating": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "The rating (out of 5) with the review",
"decimals": null,
"default": null,
"length": 1,
"name": "review_rating",
"type": "TINYINT",
"unsigned": true,
"values": [],
"zerofill": false
},
"review_votes": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "The number of people who have voted \"helpful\" or \"unhelpful\"",
"decimals": null,
"default": "0",
"length": 10,
"name": "review_votes",
"type": "INT",
"unsigned": true,
"values": [],
"zerofill": false
},
"review_votes_helpful": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "The number of people who have voted \"helpful\"",
"decimals": null,
"default": "0",
"length": 10,
"name": "review_votes_helpful",
"type": "INT",
"unsigned": true,
"values": [],
"zerofill": false
},
"review_votes_data": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "JSON object containing data about who has voted helpful\/unhelpful ",
"decimals": null,
"default": "",
"length": 0,
"name": "review_votes_data",
"type": "TEXT",
"unsigned": false,
"values": [],
"zerofill": false
},
"review_approved": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "Review is approved?",
"decimals": null,
"default": "1",
"length": 1,
"name": "review_approved",
"type": "TINYINT",
"unsigned": false,
"values": [],
"zerofill": false
}
},
"indexes": {
"PRIMARY": {
"type": "primary",
"name": "PRIMARY",
"length": [
null
],
"columns": [
"review_id"
]
},
"review_eid": {
"type": "key",
"name": "review_eid",
"length": [
null
],
"columns": [
"review_eid"
]
},
"review_mid": {
"type": "key",
"name": "review_mid",
"length": [
null
],
"columns": [
"review_mid"
]
},
"review_ip": {
"type": "key",
"name": "review_ip",
"columns": [
"review_ip"
],
"length": [
null
]
}
}
}
]
},
"42": {
"method": "addIndex",
"params": [
"calendar_event_comments",
{
"type": "key",
"name": "comment_mid",
"columns": [
"comment_mid"
],
"length": [
null
]
}
]
},
"43": {
"method": "addColumn",
"params": [
"calendar_events",
{
"name": "event_cover_offset",
"type": "INT",
"length": null,
"decimals": null,
"values": [],
"allow_null": false,
"default": "0",
"comment": "",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
}
}
@@ -0,0 +1,100 @@
<?php
/**
* @brief 4.0.0 Alpha 1 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @subpackage Calendar
* @package IPS Social Suite
* @since 8 Jan 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\calendar\setup\upg_40000;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* 4.0.0 Alpha 1 Upgrade Code
*/
class _Upgrade
{
/**
* Upgrade calendar
*
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
*/
public function step1()
{
\IPS\Db::i()->update( 'calendar_events', array( 'event_recurring' => NULL ), array( 'event_recurring=?', '0' ) );
\IPS\Db::i()->update( 'calendar_events', array( 'event_recurring' => "FREQ=yearly;INTERVAL=1" ), array( 'event_recurring=?', '3' ) );
\IPS\Db::i()->update( 'calendar_events', array( 'event_recurring' => "FREQ=monthly;INTERVAL=1" ), array( 'event_recurring=?', '2' ) );
\IPS\Db::i()->update( 'calendar_events', array( 'event_recurring' => "FREQ=weekly;INTERVAL=1" ), array( 'event_recurring=?', '1' ) );
\IPS\Db::i()->update( 'calendar_events', "event_recurring=CONCAT( event_recurring, ';UNTIL=', DATE_FORMAT( event_end_date, '%Y%m%dT%k%i%sZ' ) ), event_end_date=NULL", 'event_recurring IS NOT NULL AND event_end_date IS NOT NULL' );
\IPS\Db::i()->update( 'calendar_events', array( 'event_approved' => 0 ), "event_private=1 or event_perms!='*'" );
\IPS\Db::i()->update( 'calendar_events', array( 'event_end_date' => NULL ), array( 'event_end_date=?', '0000-00-00 00:00:00' ) );
\IPS\Db::i()->dropColumn( 'calendar_events', array( 'event_private', 'event_perms' ) );
return true;
}
/**
* Custom title for this step
*
* @return string
*/
public function step1CustomTitle()
{
return "Upgrading calendar events";
}
/**
* Upgrade calendar
*
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
*/
public function step2()
{
foreach( \IPS\Db::i()->select( '*', 'calendar_calendars' ) as $calendar )
{
\IPS\Lang::saveCustom( 'calendar', "calendar_calendar_{$calendar['cal_id']}", html_entity_decode( $calendar['cal_title'], ENT_QUOTES, 'UTF-8' ) );
}
\IPS\Db::i()->dropColumn( 'calendar_calendars', 'cal_title' );
return true;
}
/**
* Custom title for this step
*
* @return string
*/
public function step2CustomTitle()
{
return "Upgrading calendars";
}
/**
* Finish - This is run after all apps have been upgraded
*
* @return mixed If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
* @note We opted not to let users run this immediately during the upgrade because of potential issues (it taking a long time and users stopping it or getting frustrated) but we can revisit later
*/
public function finish()
{
\IPS\Task::queue( 'core', 'RebuildPosts', array( 'class' => 'IPS\calendar\Event' ), 2 );
\IPS\Task::queue( 'core', 'RebuildPosts', array( 'class' => 'IPS\calendar\Event\Comment' ), 2 );
\IPS\Task::queue( 'core', 'RebuildPosts', array( 'class' => 'IPS\calendar\Event\Review' ), 2 );
return TRUE;
}
}