Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

+38 -46
View File
@@ -54,6 +54,7 @@ class IPS
'DEV_USE_WHOOPS' => TRUE,
'DEV_USE_FURL_CACHE' => FALSE,
'DEV_USE_MENU_CACHE' => FALSE,
'DEV_SHOW_SEARCH_KEYWORD_PROMPTS' => TRUE,
'DEBUG_JS' => FALSE,
'DEV_DEBUG_JS' => TRUE,
'DEV_DEBUG_CSS' => FALSE,
@@ -68,8 +69,8 @@ class IPS
'LOG_FALLBACK_DIR' => '{root}/uploads/logs',
'STORE_METHOD' => ( isset( $_SERVER['IPS_CIC'] ) ? 'Database' : 'FileSystem' ),
'STORE_CONFIG' => '{"path":"{root}/datastore"}',
'CACHE_METHOD' => isset( $_SERVER['IPS_CIC_REDIS'] ) ? 'Redis' : 'None',
'CACHE_CONFIG' => isset( $_SERVER['IPS_CIC_REDIS'] ) ? '{ "server": "' . $_SERVER['IPS_CIC_REDIS'] . '", "port": 6379 }' : '{}',
'CACHE_METHOD' => isset( $_SERVER['IPS_CLOUD_REDIS425'] ) ? 'Redis' : 'None',
'CACHE_CONFIG' => isset( $_SERVER['IPS_CLOUD_REDIS425'] ) ? '{ "server": "' . $_SERVER['IPS_CLOUD_REDIS425'] . '", "port": 6379 }' : '{}',
'CACHE_PAGE_TIMEOUT' => ( isset( $_SERVER['IPS_CIC'] ) ? 300 : 30 ),
'TEST_CACHING' => FALSE,
'EMAIL_DEBUG_PATH' => NULL,
@@ -94,8 +95,7 @@ class IPS
'NEXUS_LKEY_API_CHECK_IP' => TRUE,
'NEXUS_LKEY_API_ALLOW_IP_OVERRIDE' => FALSE,
'UPGRADE_MANUAL_THRESHOLD' => 250000,
'HTMLENTITIES' => ( version_compare( phpversion(), '5.4.0', '<' ) ) ? ENT_IGNORE : ENT_DISALLOWED,
'SUITE_UNIQUE_KEY' => ( isset( $_SERVER['IPS_CIC'] ) and preg_match( '/^\/var\/www\/html\/(.+?)\/conf_global\.php$/i', __DIR__, $matches ) ) ? str_replace( '/', '', $matches[1] ) : mb_substr( md5( '13_mafia' . '$Rev: 3023$'), 10, 10 ),
'SUITE_UNIQUE_KEY' => ( isset( $_SERVER['IPS_CIC'] ) and preg_match( '/^\/var\/www\/html\/(.+?)$/i', __DIR__, $matches ) ) ? str_replace( '/', '', $matches[1] ) : mb_substr( md5( '13_mafia' . '$Rev: 3023$'), 10, 10 ),
'CACHEBUST_KEY' => mb_substr( md5( '13_mafia' . '$Rev: 3023$'), 10, 10 ), // This looks unnecessary but SUITE_UNIQUE_KEY can be set to a constant constant in constants.php whereas we need a version specific constant for cache busting.
'TEXT_ENCRYPTION_KEY' => NULL,
'CONNECT_MASTER_KEY' => NULL,
@@ -112,8 +112,18 @@ class IPS
'DISABLE_MFA' => FALSE,
'BOT_SEARCH_FLOOD_SECONDS' => 30,
'READ_WRITE_SEPARATION' => TRUE,
'USE_MYSQL_SEARCH_BASIC_MODE_THRESHOLD' => 0
);
'USE_MYSQL_SEARCH_BASIC_MODE_THRESHOLD' => 0,
'UPGRADE_MD5_CHECK' => TRUE,
'BYPASS_UPGRADER_LOGIN' => FALSE,
'OAUTH_REQUIRES_HTTPS' => TRUE,
'REDIS_LOG' => FALSE,
'REDIS_ENABLED' => 0,//isset( $_SERVER['IPS_CLOUD_REDIS425'] ),
'NOTIFICATIONS_PER_BATCH' => 30,
'SHOW_ACP_LINK' => TRUE,
'REPORT_EXCEPTIONS' => FALSE,
'DEFAULT_THEME_ID' => 1,
'HTMLENTITIES' => ENT_DISALLOWED, // @deprecated and will be removed in 4.4
);
}
/**
@@ -380,6 +390,7 @@ class IPS
'__invoke',
'__set_state',
'__clone',
'__debugInfo',
) )
) {
trigger_error( "{$classname}::{$method->name} does not follow our naming conventions. Please rename using only alphabetic characters and camelCase. (PHP Coding Standards: Functions and Methods.1-3)", E_USER_ERROR );
@@ -524,7 +535,16 @@ class IPS
/* Report it */
try
{
if ( !\IPS\IN_DEV and \IPS\Settings::i()->diagnostics_reporting and !\IPS\Settings::i()->theme_designers_mode and !self::exceptionWasThrownByThirdParty( $exception ) and ( !method_exists( $exception, 'isServerError' ) or !$exception->isServerError() ) )
if (
!\IPS\IN_DEV
and \IPS\REPORT_EXCEPTIONS === TRUE
and \IPS\Settings::i()->diagnostics_reporting
and !\IPS\Settings::i()->theme_designers_mode
and !self::exceptionWasThrownByThirdParty( $exception )
and ( !method_exists( $exception, 'isThirdPartyError' ) or !$exception->isThirdPartyError() )
and ( !method_exists( $exception, 'isServerError' ) or !$exception->isServerError() )
and !( $exception instanceof \ParseError )
)
{
self::reportExceptionToIPS( $exception );
}
@@ -585,8 +605,7 @@ class IPS
if ( $response->httpResponseCode == 410 )
{
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => 0 ), array( 'conf_key=?', 'diagnostics_reporting' ) );
unset( \IPS\Data\Store::i()->settings );
\IPS\Settings::i()->changeValues( array( 'diagnostics_reporting' => 0 ) );
}
}
@@ -792,43 +811,16 @@ class IPS
}
}
}
/**
* Get CiC Site Tracking ID
*
* @return int|null
*/
public static function cicTrackingId()
{
if ( \IPS\CIC and preg_match( '/^\/var\/www\/html\/(.+?)(?:\/|$)/i', \IPS\ROOT_PATH, $matches ) )
{
$id = NULL;
if ( isset( \IPS\Data\Store::i()->cicTrackingId ) )
{
$decoded = json_decode( \IPS\Data\Store::i()->cicTrackingId, TRUE );
$id = $decoded['value'];
if ( $decoded['time'] > ( time() - 86400 ) )
{
return $id;
}
}
try
{
$id = intval( (string) \IPS\Http\Url::external("https://invisioncloudstats.com/IPS/")->setQueryString( 'user', $matches[1] )->request()->get() );
}
catch ( \Exception $e )
{
return $id;
}
\IPS\Data\Store::i()->cicTrackingId = json_encode( array( 'time' => time(), 'value' => $id ) );
return $id;
}
return NULL;
}
}
/* Init */
IPS::init();
IPS::init();
/* Custom mb_ucfirst() function - eval'd so we can put into global namespace */
eval( '
function mb_ucfirst()
{
$text = func_get_arg( 0 );
return mb_strtoupper( mb_substr( $text, 0, 1 ) ) . mb_substr( $text, 1 );
}
');