Version 4.7.23

This commit is contained in:
Neo committed 2025-12-19 16:21:27 -08:00
1 parent 7124a02564
commit 25ddeb65d6
1791 files changed
+76990 -44452

No files matched your search

@@ -0,0 +1,63 @@
<?php
/**
* @brief 4.7.20 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 21 Jan 2025
*/
namespace IPS\core\setup\upg_107798;
use IPS\Db;
use IPS\Settings;
/* 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.7.20 Beta 4 Upgrade Code
*/
class _Upgrade
{
/**
* Show Sendgrid for those that have it configured
*
* @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()
{
try
{
Db::i()->select( 'conf_value', 'core_sys_conf_settings', [ 'conf_key=?', 'sendgrid_deprecated' ] )->first();
}
catch( \UnderflowException $ex )
{
$insert = [
'conf_key' => 'sendgrid_deprecated',
'conf_value' => '',
'conf_default' => '1',
'conf_keywords' => '',
'conf_app' => 'core',
'conf_report' => 'full'
];
/* This key was added in 4.7.20 Beta 1 so it may not exist */
Db::i()->insert( 'core_sys_conf_settings', $insert );
}
/* Make we see's our new one */
Settings::i()->clearCache();
/* Set our value */
Settings::i()->changeValues( [ 'sendgrid_deprecated' => Settings::i()->sendgrid_api_key ? 0 : 1 ] );
return TRUE;
}
}