Version 5.0.0 beta 4

This commit is contained in:
Neo committed 2025-12-19 16:57:00 -08:00
1 parent e86153356a
commit 2f24f9de48
276 files changed
+8614 -6044

No files matched your search

+10 -35
View File
@@ -163,6 +163,11 @@ class Upgrade
*/
public function step5() : bool|array
{
/* Kill null tags */
Db::i()->delete( 'core_tags', [ 'tag_text is null' ] );
Db::i()->delete( 'core_tags_perms', [ 'tag_perm_aap_lookup not in (?)', Db::i()->select( 'tag_aap_lookup', 'core_tags' ) ] );
Db::i()->delete( 'core_tags_cache', [ 'tag_cache_key not in (?)', Db::i()->select( 'tag_aai_lookup', 'core_tags' ) ] );
$tagsToKeep = [];
if( isset( $_SESSION['upgrade_options']['core']['200000']['open_tags'] ) )
{
@@ -170,7 +175,7 @@ class Upgrade
{
/* Get the top 25 tags */
$topTags = iterator_to_array(
Db::i()->select( 'count(tag_id) as total, tag_text', 'core_tags', null, 'total desc', array( 0, 25 ), 'tag_text' )
Db::i()->select( 'count(tag_id) as total, tag_text', 'core_tags', [ 'tag_text is not null' ], 'total desc', array( 0, 25 ), 'tag_text' )
->setKeyField( 'tag_text' )
->setValueField( 'total' )
);
@@ -180,7 +185,7 @@ class Upgrade
elseif( $_SESSION['upgrade_options']['core']['200000']['open_tags'] == 'all' )
{
$tagsToKeep = iterator_to_array(
Db::i()->select( 'distinct tag_text', 'core_tags' )
Db::i()->select( 'distinct tag_text', 'core_tags', [ 'tag_text is not null' ] )
);
}
}
@@ -188,7 +193,7 @@ class Upgrade
{
/* If we did not have this setting, then we have closed tagging, so we should convert all tags */
$tagsToKeep = iterator_to_array(
Db::i()->select( 'distinct tag_text', 'core_tags' )
Db::i()->select( 'distinct tag_text', 'core_tags', [ 'tag_text is not null' ] )
);
}
@@ -240,37 +245,7 @@ class Upgrade
return TRUE;
}
/*
* Fire background tasks to migrate lazy-load to native
*
* @return bool|array
*/
public function step6(): bool|array
{
foreach ( Content::routedClasses( FALSE, TRUE ) as $class )
{
if( isset( $class::$databaseColumnMap['content'] ) )
{
try
{
Task::queue( 'core', 'RebuildLazyLoad', array( 'class' => $class ), 3 );
}
catch( OutOfRangeException $ex ) { }
}
}
foreach( Application::allExtensions( 'core', 'EditorLocations', FALSE ) as $_key => $extension )
{
if( method_exists( $extension, 'rebuildLazyLoad' ) )
{
Task::queue( 'core', 'RebuildLazyLoadNonContent', array( 'extension' => $_key ), 3 );
}
}
return TRUE;
}
public function step7() : bool|array
public function step6() : bool|array
{
/* send a notification if custom ad locations are present */
@@ -308,7 +283,7 @@ class Upgrade
return true;
}
public function step8() : bool|array
public function step7() : bool|array
{
Task::queue( 'core', 'UpdateWidgetAreas', array(), 3 );
return TRUE;
@@ -0,0 +1,7 @@
{
"added": [],
"edited": [
"app=core&module=moderation&controller=reportedContentTypes"
],
"removed": []
}
@@ -0,0 +1,22 @@
{
"id": 5000030,
"name": "5.0.0 Beta 4",
"steps": {
"queries": true,
"lang": true,
"theme": true,
"themeeditor": true,
"javascript": true,
"emailTemplates": true,
"acpSearchKeywords": true,
"settings": true,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": true
},
"forceMainUpgrader": true,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,10 @@
{
"added": [
"notification_report_outcome",
"notification_report_content_author"
],
"edited": [
"_genericContent"
],
"removed": []
}
@@ -0,0 +1,23 @@
{
"files": {
"added": [
"global\/framework\/common\/utils\/ips.utils.lazyload.js"
],
"edited": [
"global\/admin\/controllers\/core\/ips.core.dynamicChart.js",
"global\/front\/controllers\/core\/ips.core.comment.js",
"global\/front\/controllers\/core\/ips.core.lightboxedImages.js",
"core\/front\/controllers\/modcp\/ips.modcp.reportToggle.js",
"core\/admin\/controllers\/streams\/ips.streams.form.js",
"core\/front\/controllers\/streams\/ips.streams.main.js",
"core\/front\/controllers\/widgets\/ips.widgets.manager.js",
"global\/framework\/templates\/ips.core.templates.js"
],
"removed": []
},
"orders": {
"added": [],
"edited": [],
"removed": []
}
}
@@ -0,0 +1,81 @@
{
"normal": {
"added": [
"menu__core_moderation_report",
"manage_automatic_rules",
"reporting_content_blurb",
"report_capture_guest_details",
"report_capture_guest_details_desc",
"report_guest_details_name_mandatory",
"report_guest_details_name_mandatory_desc",
"report_content_mandatory",
"report_content_mandatory_desc",
"mailsub__core_notification_report_outcome",
"report_outcome_email_blurb",
"report_outcome_email_prelude",
"notification__report_outcome",
"report_guest_details_store_days",
"report_guest_details_store_unlimited",
"report_capture_guest_details__warning",
"reporting_content_notifications_blurb",
"report_author_notification_title",
"acplog__report_author_notification_edited",
"acplog__report_author_notification_created",
"acplog__report_author_notification_deleted",
"report_notifications_title",
"report_notifications_text",
"report_notifications_title_desc",
"report_notifications_text_desc",
"modal_author__notification",
"modal_author_notification_desc",
"modal_author_notification_none",
"modal_author_notification_form_submit",
"mailsub__core_notification_report_content_author",
"report_message_placeholder_mandatory",
"filter_report_status_4",
"report_status_4",
"menu_report_status_4",
"report_guest_name",
"report_guest_email",
"report_modcp_change_submission_reason",
"report_type_change_log",
"report_type_changed",
"automaticmod_types_notify_complete",
"automaticmod_types_notify_complete_desc",
"automaticmod_types_notify_reject",
"automaticmod_types_notify_reject_desc",
"notifications__core_Moderation_reports",
"notifications__core_Moderation_reports_desc",
"report_toggle_status_confirm_title",
"report_status_changed",
"seo_reduce_links",
"seo_reduce_links_desc",
"cookie_theme_editor_vars_description",
"standard_emoji"
],
"edited": [
"r__reportedContent",
"r__reportedContentTypes",
"moderation_reporttypes_desc",
"report_status_3",
"menu_report_status_3"
],
"removed": [
"menu__core_moderation_reportedContentTypes"
]
},
"js": {
"added": [
"report_status_change_confirm",
"iconpicker_prompt",
"editor_insert_line_before",
"editor_insert_line_after",
"editor_add_box_title",
"editor_giphy_prompt"
],
"edited": [],
"removed": [
"reportStatusChanged"
]
}
}
@@ -0,0 +1,118 @@
{
"1": {
"method": "addColumn",
"params": [
"core_rc_reports",
{
"name": "guest_name",
"type": "VARCHAR",
"length": 255,
"decimals": null,
"values": null,
"allow_null": true,
"default": null,
"comment": "",
"unsigned": false,
"auto_increment": false
}
]
},
"2": {
"method": "addColumn",
"params": [
"core_rc_reports",
{
"name": "guest_email",
"type": "VARCHAR",
"length": 255,
"decimals": null,
"values": null,
"allow_null": true,
"default": null,
"comment": "",
"unsigned": false,
"auto_increment": false
}
]
},
"3": {
"method": "changeColumn",
"params": [
"core_rc_index",
"status",
{
"name": "status",
"type": "ENUM",
"length": 0,
"decimals": null,
"values": [
"1",
"2",
"3",
"4"
],
"allow_null": false,
"default": "1",
"comment": "1 = New report. 2 = Under Review. 3 = Complete. 4 = Closed.",
"unsigned": false,
"auto_increment": false
}
]
},
"4": {
"method": "createTable",
"params": [
{
"name": "core_rc_author_notification_text",
"columns": {
"id": {
"name": "id",
"type": "BIGINT",
"length": "20",
"unsigned": true,
"allow_null": false,
"default": null,
"auto_increment": true,
"comment": "ID Number"
},
"title": {
"name": "title",
"type": "VARCHAR",
"length": 255,
"decimals": null,
"values": null,
"allow_null": false,
"default": "",
"comment": "",
"unsigned": false,
"auto_increment": false
},
"text": {
"name": "text",
"type": "TEXT",
"length": null,
"decimals": null,
"values": null,
"allow_null": false,
"default": null,
"comment": "",
"unsigned": false,
"auto_increment": false
}
},
"indexes": {
"PRIMARY": {
"type": "primary",
"name": "PRIMARY",
"columns": [
"id"
],
"length": [
null
]
}
}
}
]
}
}
@@ -0,0 +1,11 @@
{
"added": [
"report_capture_guest_details",
"report_content_mandatory",
"report_guest_details_name_mandatory",
"report_guest_details_store_days",
"seo_reduce_links"
],
"edited": [],
"removed": []
}
@@ -0,0 +1,60 @@
{
"html": {
"added": [],
"edited": [
"front\/clubs\/directory",
"front\/clubs\/members",
"global\/editor\/image",
"global\/forms\/checkbox",
"front\/global\/comment",
"front\/global\/commentContainer",
"global\/global\/dynamicChart",
"front\/global\/mobileFooterBar",
"front\/global\/review",
"front\/global\/reviewContainer",
"front\/global\/sharemenu",
"front\/modcp\/approvalQueueItemWrapper",
"front\/modcp\/deletedRows",
"front\/modcp\/hiddenTableRow",
"front\/modcp\/hiddenTableRows",
"front\/modcp\/report",
"front\/modcp\/reportTableDescription",
"front\/modcp\/reportToggle",
"front\/modcp\/template",
"front\/modcp\/warnHovercard",
"front\/modcp\/warningRevoke",
"front\/profile\/profile",
"front\/search\/member",
"front\/streams\/stream",
"front\/system\/warningRow",
"front\/tags\/overview",
"front\/widgets\/tags"
],
"removed": [
"front\/forms\/statusPopupTemplate",
"front\/forms\/statusTemplate",
"front\/forms\/statusWidgetForm"
]
},
"css": {
"added": [],
"edited": [
"global\/framework\/3-badges.css",
"global\/framework\/3-buttons.css",
"global\/framework\/3-data-tables.css",
"global\/framework\/3-editor.css",
"global\/framework\/3-grid.css",
"global\/framework\/3-images.css",
"global\/framework\/3-inputs.css",
"global\/framework\/3-messages.css",
"front\/styles\/messaging.css",
"front\/styles\/profiles.css"
],
"removed": []
},
"resources": {
"added": [],
"edited": [],
"removed": []
}
}
@@ -0,0 +1,116 @@
{
"categories": {
"added": [],
"edited": [
"lightDarkMode",
"logos",
"pageLayouts",
"typography",
"header",
"sidePanel",
"content",
"footer",
"mobileNavigation",
"navigationPanel",
"global",
"textLogo",
"imageLogoDesktop",
"imageLogoMobile",
"desktopHeader",
"mobileHeader",
"desktopFooter",
"body",
"contentBoxes",
"sidebar",
"avatars",
"buttons"
],
"removed": []
},
"settings": {
"added": [],
"edited": [
"set__i-default-scheme",
"set__i-logo-text",
"set__i-sidebar-width",
"i-primary-button--co",
"set__i-mobile-icons-location",
"set__logo-light",
"i-footer--co",
"set__mobile-logo-light",
"layout_global_view_mode",
"set__i-font-family",
"set__i-design-border",
"set__i-layout-width",
"set__i-sidebar-ui-header--he",
"set__i-position-logo",
"set__i-mobile-header--he",
"set__i-change-scheme",
"set__i-logo-slogan",
"i-primary-button--ba-co",
"set__i-mobile-footer-labels",
"set__logo-dark",
"i-footer--ba-co",
"set__mobile-logo-dark",
"set__i-design-radius",
"set__i-font-size",
"set__i-flip-sidebar",
"i-dashHeader--ba-co",
"set__i-position-navigation",
"i-headerMobile--ba-co",
"i-headerMobile--co",
"i-secondary-button--co",
"set__i-logo--fo-fa",
"set__i-position-user",
"i-dashHeader--co",
"set__i-avatar-radius",
"i-color_root",
"set__i-mobile-logo--he",
"set__i-design-shadow",
"i-mobileFooter--ba-co",
"set__i-logo--he",
"i-secondary-button--ba-co",
"set__i-logo--fo-we",
"i-navPanelLinkHover--co",
"set__i-position-breadcrumb",
"i-mobileFooter--co",
"i-color_soft",
"i-body--ba-co",
"set__i-link-panels",
"set__i-sidebar-ui-logo--he",
"i-button--bo-ra",
"set__i-desktop-logo--fo-si",
"set__i-sticky-sidebar",
"i-navPanelLinkActive--ba-co",
"set__i-position-search",
"i-mobileFooter-active--co",
"i-color_hard",
"i-box--ba-co",
"set__i-header-primary--he",
"set__i-sidebar-ui-logo--fo-si",
"i-box--bo-co",
"i-link--co",
"i-mobileFooter-active--ba-co",
"i-navPanel--ba-co",
"set__i-mobile-logo--fo-si",
"i-link-hover--co",
"i-navPanel--co",
"set__i-header-secondary--he",
"i-boxHeader--ba-co",
"i-boxHeader--co",
"set__i-user-content-font-size",
"i-navPanelLinkActive--co",
"set__i-nav-bar-icons",
"i-widget-header--ba-co",
"i-headerTop--ba-co",
"i-widget-header--co",
"i-headerTop--co",
"i-headerPrimary--ba-co",
"i-headerPrimary--co",
"i-headerSecondary--ba-co",
"i-headerSecondary--co",
"set__i-header-top--he"
],
"removed": []
}
}
@@ -0,0 +1,65 @@
<?php
/**
* @brief 5.0.0 Beta 4 Upgrade Code
* @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
* @since 04 Nov 2024
*/
namespace IPS\core\setup\upg_5000030;
use IPS\Application;
use IPS\Content;
use IPS\Task;
use OutOfRangeException;
use function defined;
use function method_exists;
/* 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;
}
/**
* 5.0.0 Beta 4 Upgrade Code
*/
class Upgrade
{
/**
* Fire background tasks to migrate lazy-load to native
*
* @return bool|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() : bool|array
{
foreach ( Content::routedClasses( FALSE, TRUE ) as $class )
{
if( isset( $class::$databaseColumnMap['content'] ) )
{
try
{
Task::queue( 'core', 'RebuildLazyLoad', array( 'class' => $class ), 3 );
}
catch( OutOfRangeException $ex ) { }
}
}
foreach( Application::allExtensions( 'core', 'EditorLocations', FALSE ) as $_key => $extension )
{
if( method_exists( $extension, 'rebuildLazyLoad' ) )
{
Task::queue( 'core', 'RebuildLazyLoadNonContent', array( 'extension' => $_key ), 3 );
}
}
return TRUE;
}
// You can create as many additional methods (step2, step3, etc.) as is necessary.
// Each step will be executed in a new HTTP request
}