Version 5.0.0 beta 1

This commit is contained in:
Neo committed 2025-12-19 16:27:35 -08:00
1 parent 25ddeb65d6
commit 15c7beabc5
6736 files changed
+627902 -497943

No files matched your search

+19 -9
View File
@@ -12,16 +12,26 @@
namespace IPS\core\setup\upg_106156;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
use IPS\Api\Key;
use IPS\Api\OAuthClient;
use IPS\core\extensions\core\CommunityEnhancements\Zapier;
use IPS\Db;
use IPS\Settings;
use OutOfRangeException;
use UnderflowException;
use function defined;
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* 4.6.11 Beta 1 Upgrade Code
*/
class _Upgrade
class Upgrade
{
/**
* remove mobile app client
@@ -32,30 +42,30 @@ class _Upgrade
{
try
{
$client = \IPS\Api\OAuthClient::constructFromData( \IPS\Db::i()->select( '*', 'core_oauth_clients', array( 'oauth_type=?', 'mobile' ) )->first() );
$client = OAuthClient::constructFromData( Db::i()->select( '*', 'core_oauth_clients', array( 'oauth_type=?', 'mobile' ) )->first() );
$client->delete();
}
catch ( \UnderflowException $e )
catch ( UnderflowException $e )
{
}
/* Rebuild Zapier REST API Key Permissions */
if( \IPS\Settings::i()->zapier_api_key )
if( Settings::i()->zapier_api_key )
{
try
{
$apiKey = \IPS\Api\Key::load( \IPS\Settings::i()->zapier_api_key );
$apiKey = Key::load( Settings::i()->zapier_api_key );
$correctPermissions = json_encode( \IPS\core\extensions\core\CommunityEnhancements\Zapier::apiKeyPermissions() );
$correctPermissions = json_encode( Zapier::apiKeyPermissions() );
if ( $apiKey->permissions != $correctPermissions )
{
$apiKey->permissions = $correctPermissions;
$apiKey->save();
}
}
catch ( \OutOfRangeException $e )
catch ( OutOfRangeException $e )
{
}