Version 4.6.0

This commit is contained in:
Neo committed 2025-12-19 05:55:31 -08:00
1 parent f79dcf067a
commit 517a5e1f70
2036 files changed
+110041 -26162

No files matched your search

+25 -4
View File
@@ -76,7 +76,7 @@ class _Redis
if ( ! isset( static::$multitons[ $identifier ] ) )
{
static::$multitons[ $identifier ] = new self;
static::$multitons[ $identifier ] = new static;
/* Set the prefix with the most obvious comment in the world */
static::$multitons[ $identifier ]->prefix = \IPS\SUITE_UNIQUE_KEY . '_';
@@ -355,7 +355,7 @@ class _Redis
if ( \IPS\REDIS_LOG )
{
static::$log[ sprintf( '%.4f', microtime(true) ) ] = array( 'redis', "(read) sort " . $key, json_encode( $return ) );
static::$log[ sprintf( '%.4f', microtime(true) ) ] = array( 'redis', "(write) sort " . $key, json_encode( $return ) );
}
return $return;
@@ -431,7 +431,14 @@ class _Redis
*/
public function encode( $value )
{
return \IPS\Text\Encrypt::fromPlaintext( json_encode( $value ) )->tag();
if ( \IPS\CIC )
{
return \IPS\Text\Encrypt::fromPlaintext( json_encode( $value ) )->tag();
}
else
{
return json_encode( $value );
}
}
/**
@@ -442,7 +449,21 @@ class _Redis
*/
public function decode( $value )
{
return json_decode( \IPS\Text\Encrypt::fromTag( $value )->decrypt(), TRUE );
if ( \IPS\CIC )
{
$decoded = json_decode( \IPS\Text\Encrypt::fromTag( $value )->decrypt(), TRUE );
if( $decoded === NULL )
{
throw new \RedisException;
}
}
else
{
$decoded = json_decode( $value, TRUE );
}
return $decoded;
}
/**