Version 4.5.0

This commit is contained in:
Neo committed 2025-12-19 05:51:58 -08:00
1 parent 1a0c7fd3c2
commit f79dcf067a
3791 files changed
+248032 -76372

No files matched your search

+11 -8
View File
@@ -11,7 +11,7 @@
namespace IPS\core\tasks;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -52,7 +52,7 @@ class _usagereporting extends \IPS\Task
/* Send the report */
try
{
$response = \IPS\Http\Url::external('https://invisionpowerdiagnostics.com/usage')->request()->post( $this->buildReport() );
$response = \IPS\Http\Url::external('https://invisionpowerdiagnostics.com/usage/')->request(2)->post( $this->buildReport() ); // Timeout is deliberately very low because we don't care if it times out (but not 0 because we still need to let the DNS resolve)
/* If the server has asked us to stop sending reports, then turn it off */
if ( $response->httpResponseCode == 410 )
@@ -61,7 +61,10 @@ class _usagereporting extends \IPS\Task
\IPS\Db::i()->update( 'core_tasks', array( 'enabled' => 0 ), array( '`key`=?', 'usagereporting' ) );
}
}
catch ( \IPS\Http\Url\Exception $e ) { }
catch ( \IPS\Http\Request\Exception $e )
{
// It will probably time out, but that's okay
}
return NULL;
}
@@ -122,7 +125,7 @@ class _usagereporting extends \IPS\Task
$settings = array();
foreach ( $theme->settings as $k => $v )
{
if ( in_array( $k, array( 'responsive', 'rounded_photos', 'social_links', 'sidebar_position', 'sidebar_responsive', 'enable_fluid_width', 'fluid_width_size', 'js_incclude', 'ajax_pagination', 'cm_store_view', 'body_font', 'headline_font' ) ) )
if ( \in_array( $k, array( 'responsive', 'rounded_photos', 'social_links', 'sidebar_position', 'sidebar_responsive', 'enable_fluid_width', 'fluid_width_size', 'js_incclude', 'ajax_pagination', 'cm_store_view', 'body_font', 'headline_font' ) ) )
{
$settings[ $k ] = $v;
}
@@ -151,7 +154,7 @@ class _usagereporting extends \IPS\Task
/* Settings */
foreach ( \IPS\Db::i()->select( array( 'conf_key', 'conf_value', 'conf_default', 'conf_app', 'conf_report' ), 'core_sys_conf_settings', 'conf_report IS NOT NULL' ) as $row )
{
if ( in_array( $row['conf_app'], \IPS\Application::$ipsApps ) and \IPS\Application::appIsEnabled( $row['conf_app'] ) )
if ( \in_array( $row['conf_app'], \IPS\Application::$ipsApps ) and \IPS\Application::appIsEnabled( $row['conf_app'] ) )
{
if ( $row['conf_report'] == 'full' )
{
@@ -185,7 +188,7 @@ class _usagereporting extends \IPS\Task
{
try
{
$class = \strtolower( \substr( get_class( \IPS\File::getClass( $k ) ), 9 ) );
$class = \strtolower( \substr( \get_class( \IPS\File::getClass( $k ) ), 9 ) );
if ( isset( $report['files'][ $class ] ) )
{
@@ -220,7 +223,7 @@ class _usagereporting extends \IPS\Task
$report['login']['other'] = 0;
foreach ( \IPS\Login::methods() as $method )
{
$class = get_class( $method );
$class = \get_class( $method );
if ( array_key_exists( $class, $loginMethods ) )
{
$report['login'][ $loginMethods[ $class ] ]++;
@@ -238,7 +241,7 @@ class _usagereporting extends \IPS\Task
$report['paymethods'] = array( 'authorizenet_aim' => 0, 'authorizenet_dpm' => 0, 'manual' => 0, 'paypal_standard' => 0, 'paypal_pro' => 0, 'stripe_card' => 0, 'stripe_native' => 0, 'stripe_alipay' => 0, 'stripe_amex' => 0, 'stripe_bancontact' => 0, 'stripe_giropay' => 0, 'stripe_ideal' => 0, 'stripe_sofort' => 0, 'test' => 0, 'twocheckout' => 0, 'other' => 0 );
foreach ( \IPS\nexus\Gateway::roots() as $gateway )
{
$class = \strtolower( \substr( get_class( $gateway ), 18 ) );
$class = \strtolower( \substr( \get_class( $gateway ), 18 ) );
$settings = json_decode( $gateway->settings, TRUE );
if ( $class === 'authorizenet' )