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

+7 -7
View File
@@ -12,7 +12,7 @@
namespace IPS\Http;
/* 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;
@@ -66,7 +66,7 @@ class _Ranges extends Response
$ranges = explode( ",", $range );
/* Did we only find one range? */
if( count($ranges) == 1 )
if( \count($ranges) == 1 )
{
\IPS\Log::debug( "Only one range detected", 'ranges' );
@@ -165,7 +165,7 @@ class _Ranges extends Response
}
/* Did we still only have one range? */
if( count($the_responses) == 1 )
if( \count($the_responses) == 1 )
{
$length = $the_responses[0][2];
$start_range = $the_responses[0][0];
@@ -185,7 +185,7 @@ class _Ranges extends Response
}
}
/* Now we're working with something exciting */
else if( count($the_responses) > 1 )
else if( \count($the_responses) > 1 )
{
$content_length = 0;
@@ -229,7 +229,7 @@ class _Ranges extends Response
}
/* Not sending multiple ranges */
if( !isset( $the_responses ) OR !count( $the_responses ) )
if( !isset( $the_responses ) OR !\count( $the_responses ) )
{
\IPS\Output::i()->sendHeader( 'Content-Type: ' . \IPS\File::getMimeType( $file->originalFilename ) );
\IPS\Output::i()->sendHeader( 'Content-Disposition: ' . \IPS\Output::getContentDisposition( 'attachment', $file->originalFilename ) );
@@ -245,7 +245,7 @@ class _Ranges extends Response
$throttle = ( $throttle > 0 ) ? ( $throttle * 1024 ) : NULL;
/* Do we have multiple ranges? */
if( isset( $the_responses ) AND count($the_responses) )
if( isset( $the_responses ) AND \count($the_responses) )
{
/* Loop over each range */
foreach( $the_responses as $part )
@@ -285,7 +285,7 @@ class _Ranges extends Response
$ranges = explode( ",", $range );
/* Did we only find one range? */
if( count($ranges) == 1 )
if( \count($ranges) == 1 )
{
/* Get the actual range start and end */
list( $start_range, $end_range ) = explode( "-", $range );